diff --git a/makefiles/Makefile.python.mk b/makefiles/Makefile.python.mk index 6d4dff762bc..57bb21c84db 100755 --- a/makefiles/Makefile.python.mk +++ b/makefiles/Makefile.python.mk @@ -229,6 +229,7 @@ python_examples_archive: $(COPY) LICENSE-2.0.txt temp$Sortools_examples $(COPY) tools$Ssetup_data.py temp$Sortools_examples$Ssetup.py $(SED) -i -e 's/VVVV/$(OR_TOOLS_VERSION)/' temp$Sortools_examples$Ssetup.py + $(SED) -i -e 's/XXXX/$(PYPI_OS)/' temp$Sortools_examples$Ssetup.py $(COPY) tools$Scheck_python_deps.py temp$Sortools_examples $(SED) -i -e 's/VVVV/$(OR_TOOLS_VERSION)/' temp$Sortools_examples$Scheck_python_deps.py $(SED) -i -e 's/PROTOBUF_TAG/$(PROTOBUF_TAG)/' temp$Sortools_examples$Scheck_python_deps.py @@ -274,9 +275,9 @@ $(PYPI_ARCHIVE_TEMP_DIR) : $(OR_TOOLS_PYTHON_GEN_SCRIPTS) $(PATCHELF) $(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_ARCHIVE_TEMP_DIR)$Sortools$Ssetup.py + $(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_ARCHIVE_TEMP_DIR)$Sortools$Ssetup.py + $(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 diff --git a/tools/docker/Makefile b/tools/docker/Makefile index 9a174c6fda1..acbb801f46e 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -23,14 +23,20 @@ archives: \ ubuntu-16.04-archive \ ubuntu-17.04-archive -delivery: \ - ubuntu-14.04-archive \ - ubuntu-14.04-pypi \ - ubuntu-14.04-pypi3 \ - ubuntu-16.04-archive \ - ubuntu-16.04-pypi \ - ubuntu-16.04-pypi3 \ - ubuntu-17.04-archive +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-pyp3i + +delivery: archive pypi pypy3 # Ubuntu 14.04 images @@ -41,13 +47,13 @@ ubuntu-14.04-image-no-cache: docker build --no-cache -f ubuntu-14.04.Dockerfile -t or-tools-ubuntu-14.04-image . ubuntu-14.04-archive: 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; make archive python_examples_archive; cp *.tar.gz /export" + 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; make archive; cp *.tar.gz /export" 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; make pypi_export" + 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" 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; make pypi_export" + 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 @@ -61,10 +67,10 @@ ubuntu-16.04-archive: 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; make archive python_examples_archive; cp *.tar.gz /export" 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; make pypi_export" + 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" 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; make pypi_export" + 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-16.04-bash: ubuntu-16.04-image docker run -w /root/or-tools -v `pwd`/export:/export -it or-tools-ubuntu-16.04-image:latest /bin/bash @@ -81,10 +87,10 @@ ubuntu-17.04-archive: 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; pwd; make clean; make all -j 5; make test; make archive; cp *.tar.gz /export" 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; make pypi_export" + 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" 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; make pypi_export" + 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 @@ -98,10 +104,10 @@ debian-9-archive: 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; pwd; make clean; make all -j 5; make test; make archive; cp *.tar.gz /export" 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; make pypi_export" + 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" 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; make pypi_export" + 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 @@ -115,7 +121,7 @@ centos-7-archive: 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; make archive python_examples_archive; cp *.tar.gz /export" 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; make pypi_export" + 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" centos-7-bash: centos-7-image docker run -w /root/or-tools -v `pwd`/export:/export -it or-tools-centos-7-image:latest /bin/bash diff --git a/tools/setup_data.py b/tools/setup_data.py index 7c617679f5a..58937f2dbb2 100644 --- a/tools/setup_data.py +++ b/tools/setup_data.py @@ -23,9 +23,9 @@ def read(fname): return open(pjoin(dirname(__file__), fname)).read() if version_info[0] >= 3: - install_requires = ["py3-ortools == VVVV"] + install_requires = ["py3-ortoolsXXXX == VVVV"] else: - install_requires = ["ortools == VVVV"] + install_requires = ["ortoolsXXXX == VVVV"] setup( name='ortools_examples',