Skip to content

Commit

Permalink
cleanup python modules, makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Oct 2, 2017
1 parent 7892f0b commit ae8fa98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
14 changes: 0 additions & 14 deletions makefiles/Makefile.python.mk
Original file line number Diff line number Diff line change
Expand Up @@ -373,20 +373,6 @@ else
endif
cd $(PYPI_ARCHIVE_TEMP_DIR)/ortools && twine upload dist/*

pypi_export: pypi_archive # to be used in docker (linux only).
@echo Exporting Pypi module for $(PYTHON_EXECUTABLE).
ifeq ($(SYSTEM),win)
cd $(PYPI_ARCHIVE_TEMP_DIR)\ortools && $(PYTHON_EXECUTABLE) setup.py bdist_egg bdist_wheel bdist_wininst
else
ifeq ($(PLATFORM),MACOSX)
cd $(PYPI_ARCHIVE_TEMP_DIR)/ortools && $(PYTHON_EXECUTABLE) setup.py bdist_egg bdist_wheel
else
cd $(PYPI_ARCHIVE_TEMP_DIR)/ortools && $(PYTHON_EXECUTABLE) setup.py bdist_egg bdist_wheel
endif
endif
$(COPY) $(PYPI_ARCHIVE_TEMP_DIR)/ortools/dist/* /export


detect_python:
@echo PYTHON3 = $(PYTHON3)
@echo SWIG_PYTHON3_FLAG = $(SWIG_PYTHON3_FLAG)
16 changes: 8 additions & 8 deletions tools/Makefile.python
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
WINDOWS_PATH_TO_PYTHON =

# Set this variable to use it as PYTHONPATH
WINDOWS_PYTHONPATH =
WINDOWS_PYTHONPATH =

###############################Unix specific part################################

# Set UNIX_PYTHON_VER to the version number of the Python installation on your computer that you wish to use with or-tools.
#Example : UNIX_PYTHON_VER = 3.5 or UNIX_PYTHON_VER = 2.7
UNIX_PYTHON_VER =
UNIX_PYTHON_VER =

# Set this variable to use it as PYTHONPATH.
UNIX_PYTHONPATH =
UNIX_PYTHONPATH =

##################################################################################

Expand All @@ -34,21 +34,21 @@ endif

ifeq ($(SYSTEM),win)
PYTHON_EXECUTABLE = $(WINDOWS_PATH_TO_PYTHON)$Spython
#Set PYTHONPATH only when WINDOWS_PYTHONPATH is used.
#Set PYTHONPATH only when WINDOWS_PYTHONPATH is used.
ifneq ($(WINDOWS_PYTHONPATH),)
SET_PYTHONPATH = @set PYTHONPATH=$(WINDOWS_PYTHONPATH) &&
endif
else #UNIX
PYTHON_EXECUTABLE = python$(UNIX_PYTHON_VER)
#Set PYTHONPATH only when UNIX_PYTHONPATH is used.
#Set PYTHONPATH only when UNIX_PYTHONPATH is used.
ifneq ($(UNIX_PYTHONPATH),)
SET_PYTHONPATH = @PYTHONPATH=$(UNIX_PYTHONPATH)
endif

endif #ifeq ($(SYSTEM),win)

install:
$(PYTHON_EXECUTABLE) setup.py install --user
install:
@echo Please run pip install ortools
$(SET_PYTHONPATH) $(PYTHON_EXECUTABLE) check_python_deps.py --log=ERROR

check:
Expand All @@ -59,4 +59,4 @@ rpy: $(EX)
$(SET_PYTHONPATH) $(PYTHON_EXECUTABLE) check_python_deps.py --log=ERROR
$(SET_PYTHONPATH) $(PYTHON_EXECUTABLE) $(EX) $(ARGS)

print-% : ; @echo $* = $($*)
print-% : ; @echo $* = $($*)

0 comments on commit ae8fa98

Please sign in to comment.