diff --git a/makefiles/Makefile.python.mk b/makefiles/Makefile.python.mk index 14b6f07656..9241c5f1e5 100755 --- a/makefiles/Makefile.python.mk +++ b/makefiles/Makefile.python.mk @@ -335,11 +335,7 @@ endif $(COPY) tools$SREADME.pypi $(PYPI_ARCHIVE_TEMP_DIR)$Sortools$SREADME.txt $(COPY) LICENSE-2.0.txt $(PYPI_ARCHIVE_TEMP_DIR)$Sortools $(COPY) tools$Ssetup.py $(PYPI_ARCHIVE_TEMP_DIR)$Sortools -ifeq ($(PYTHON3),true) - $(SED) -i -e 's/ORTOOLS_PYTHON_VERSION/py3-ortools$(PYPI_OS)/' $(PYPI_ARCHIVE_TEMP_DIR)$Sortools$Ssetup.py -else $(SED) -i -e 's/ORTOOLS_PYTHON_VERSION/ortools$(PYPI_OS)/' $(PYPI_ARCHIVE_TEMP_DIR)$Sortools$Ssetup.py -endif $(SED) -i -e 's/VVVV/$(OR_TOOLS_VERSION)/' $(PYPI_ARCHIVE_TEMP_DIR)$Sortools$Ssetup.py $(SED) -i -e 's/PROTOBUF_TAG/$(PROTOBUF_TAG)/' $(PYPI_ARCHIVE_TEMP_DIR)$Sortools$Ssetup.py ifeq ($(SYSTEM),win) diff --git a/tools/check_python_deps.py b/tools/check_python_deps.py index d26e6caeb7..3e25b32756 100644 --- a/tools/check_python_deps.py +++ b/tools/check_python_deps.py @@ -43,7 +43,7 @@ if __name__ == '__main__': parser = OptionParser('Log level') parser.add_option('-l','--log',type='string',help='Available levels are CRITICAL (3), ERROR (2), WARNING (1), INFO (0), DEBUG (-1)',default='INFO') options,args = parser.parse_args() - + #Create the logger try: loglevel = getattr(logging,options.log.upper()) @@ -54,7 +54,7 @@ if __name__ == '__main__': 0:logging.INFO, -1:logging.DEBUG, }[int(options.log)] - + logging.basicConfig(format='[%(levelname)s] %(message)s', stream=sys.stdout, level=loglevel) #Display Python Version and path @@ -62,10 +62,7 @@ if __name__ == '__main__': logging.info("Python version : " + sys.version) #Choose the pypi package - if sys.version_info[0] >= 3: - ortools_name = "py3-ortools" - else: - ortools_name = "ortools" + ortools_name = "ortools" #try to import ortools try: @@ -103,4 +100,4 @@ if __name__ == '__main__': from ortools.constraint_solver import _pywrapcp from ortools.linear_solver import _pywraplp from ortools.algorithms import _pywrapknapsack_solver - from ortools.graph import _pywrapgraph \ No newline at end of file + from ortools.graph import _pywrapgraph diff --git a/tools/docker/Makefile b/tools/docker/Makefile index 3e19d54f1d..6ca040827f 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -31,21 +31,7 @@ archives: \ ubuntu-16.04-archive \ ubuntu-17.04-archive -python: manylinux1-pypi3 - -pypi: \ - centos-7-pypi \ - debian-9-pypi \ - ubuntu-14.04-pypi \ - ubuntu-16.04-pypi \ - ubuntu-17.04-pypi - -pypi3: \ - debian-9-pypi3 \ - ubuntu-14.04-pypi3 \ - ubuntu-16.04-pypi3 \ - ubuntu-17.04-pypi3 \ - manylinux1-pypi3 +python: manylinux1-pypi test: \ centos-7-test \ @@ -54,7 +40,7 @@ test: \ ubuntu-16.04-test \ ubuntu-17.04-test -delivery: archives pypi pypi3 +delivery: archives python # Ubuntu 14.04 images @@ -70,12 +56,6 @@ ubuntu-14.04-archive: export ubuntu-14.04-image ubuntu-14.04-test: export ubuntu-14.04-image docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-14.04-image:latest /bin/bash -c "git pull; make clean; make all -j 5; make test" -ubuntu-14.04-pypi: export ubuntu-14.04-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-14.04-image:latest /bin/bash -c "git pull; make clean; make python -j 5; make test_python; PYPI_OS=-ubuntu-14.04 make pypi_export python_examples_archive; cp *.tar.gz /export" - -ubuntu-14.04-pypi3: export ubuntu-14.04-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-14.04-image:latest /bin/bash -c "git pull; sed -i -e 's/2.7/3.4/g' Makefile.local; make clean; make python -j 5; make test_python; PYPI_OS=-ubuntu-14.04 make pypi_export" - # Ubuntu 16.06 images ubuntu-16.04-image: @@ -90,12 +70,6 @@ ubuntu-16.04-archive: export ubuntu-16.04-image ubuntu-16.04-test: export ubuntu-16.04-image docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-16.04-image:latest /bin/bash -c "git pull; make clean; make all -j 5; make test" -ubuntu-16.04-pypi: export ubuntu-16.04-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-16.04-image:latest /bin/bash -c "git pull; make clean; make python -j 5; make test_python; PYPI_OS=-ubuntu-16.04 make pypi_export python_examples_archive; cp *.tar.gz /export" - -ubuntu-16.04-pypi3: export ubuntu-16.04-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-16.04-image:latest /bin/bash -c "git pull; sed -i -e 's/2.7/3.5/g' Makefile.local; make clean; make python -j 5; make test_python; PYPI_OS=-ubuntu-16.04 make pypi_export" - # Ubuntu 17.04 images ubuntu-17.04-image: @@ -110,12 +84,6 @@ ubuntu-17.04-archive: export ubuntu-17.04-image ubuntu-17.04-test: export ubuntu-17.04-image docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-17.04-image:latest /bin/bash -c "git pull; make clean; make all -j 5; make test" -ubuntu-17.04-pypi: export ubuntu-17.04-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-17.04-image:latest /bin/bash -c "git pull; make clean; make python -j 5; make test_python; PYPI_OS=-ubuntu-17.04 make pypi_export python_examples_archive; cp *.tar.gz /export" - -ubuntu-17.04-pypi3: export ubuntu-17.04-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-ubuntu-17.04-image:latest /bin/bash -c "git pull; sed -i -e 's/2.7/3.5/g' Makefile.local; make clean; make python -j 5; make test_python; PYPI_OS=-ubuntu-17.04 make pypi_export" - # Debian 9 images debian-9-image: @@ -130,12 +98,6 @@ debian-9-archive: export debian-9-image debian-9-test: export debian-9-image docker run -w /root/or-tools -v `pwd`/export:/export or-tools-debian-9-image:latest /bin/bash -c "git pull; make clean; make all -j 5; make test" -debian-9-pypi: export debian-9-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-debian-9-image:latest /bin/bash -c "git pull; make clean; make python -j 5; make test_python; PYPI_OS=-debian-9 make pypi_export python_examples_archive; cp *.tar.gz /export" - -debian-9-pypi3: export debian-9-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-debian-9-image:latest /bin/bash -c "git pull; sed -i -e 's/2.7/3.5/g' Makefile.local; make clean; make python -j 5; make test_python; PYPI_OS=-debian-9 make pypi_export" - # Centos 7 images centos-7-image: @@ -150,13 +112,10 @@ centos-7-archive: export centos-7-image centos-7-test: export centos-7-image docker run -w /root/or-tools -v `pwd`/export:/export or-tools-centos-7-image:latest /bin/bash -c "git pull; make clean; make all -j 5; make test" -centos-7-pypi: export centos-7-image - docker run -w /root/or-tools -v `pwd`/export:/export or-tools-centos-7-image:latest /bin/bash -c "git pull; make clean; make python -j 5; make test_python; PYPI_OS=-centos-7 make pypi_export python_examples_archive; cp *.tar.gz /export" - # manylinux1 images manylinux1-image: docker build -f manylinux1.Dockerfile -t or-tools-manylinux1-image . -manylinux1-pypi3: export manylinux1-image +manylinux1-pypi: export manylinux1-image docker run -v `pwd`/export:/export or-tools-manylinux1-image:latest /bin/bash -c "/root/build/build-manylinux1.sh /root/src /root/build /export" diff --git a/tools/setup_data.py b/tools/setup_data.py index 58937f2dbb..a0ce40375c 100644 --- a/tools/setup_data.py +++ b/tools/setup_data.py @@ -22,10 +22,7 @@ from sys import version_info def read(fname): return open(pjoin(dirname(__file__), fname)).read() -if version_info[0] >= 3: - install_requires = ["py3-ortoolsXXXX == VVVV"] -else: - install_requires = ["ortoolsXXXX == VVVV"] +install_requires = ["ortoolsXXXX == VVVV"] setup( name='ortools_examples',