diff options
| author | Christophe Monniez <moc@odoo.com> | 2018-04-24 16:51:40 +0200 |
|---|---|---|
| committer | Christophe Monniez <moc@odoo.com> | 2018-04-26 09:22:38 +0200 |
| commit | 5666bc3d32104860f77325e407f19e04993ebab7 (patch) | |
| tree | 2dd4c8e1bf359d21975b5aaf830732873f67606c /setup | |
| parent | 051dfea35e21ad2e249acc08c91a553a7ef6a4aa (diff) | |
[IMP] packaging: automate package update in Windows build
When building the Windows installer, a virtual machine is used with
prepackaged python modules.
With this commit, the packaging script will try to install on the
virtual machine the python packages specified in requirements.txt.
Each package is installed individually, that way, if an install fails,
the install of the other packages continues.
At the end of the process, successfully packages are listed so that they
will appear in the build log files.
Also, the Makefile was cleaned in this commit (removal of py2exe stuffs).
Diffstat (limited to 'setup')
| -rw-r--r-- | setup/win32/Makefile | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/setup/win32/Makefile b/setup/win32/Makefile index 2efa1db6f69..3644d7fe0db 100644 --- a/setup/win32/Makefile +++ b/setup/win32/Makefile @@ -5,12 +5,10 @@ include Makefile.servicename SERVER_DIRECTORY=../.. FILES_DIRECTORY=release -LAUNCH_PY2EXE_SERVICE=/cygdrive/c/python${PYTHON_VERSION}/python.exe win32_setup.py py2exe -LAUNCH_PY2EXE=/cygdrive/c/python${PYTHON_VERSION}/python.exe setup.py py2exe - MAKENSIS_ARGUMENTS=/DVERSION=$(VERSION) /DSERVICENAME=${SERVICENAME} LAUNCH_MAKENSIS=/cygdrive/c/tools/cygwin/makensis $(MAKENSIS_ARGUMENTS) setup.nsi +WINPY_DIR=/cygdrive/c/odoobuild/WinPython/python-3.6.2 default: allinone @@ -27,8 +25,11 @@ server_clean: rm -rf $(SERVER_DIRECTORY)/.cyg* allinone: server_clean - #(cd $(SERVER_DIRECTORY)/setup/win32 && $(LAUNCH_PY2EXE_SERVICE)) - #(cd $(SERVER_DIRECTORY) && $(LAUNCH_PY2EXE)) + cp $(SERVER_DIRECTORY)/requirements.txt $(WINPY_DIR)/ + -(cd $(WINPY_DIR) && ./python.exe -m pip install --upgrade pip) + -(cd $(WINPY_DIR) && cat requirements.txt | while read PAC ; do Scripts/pip3.exe install "$${PAC}" ; done) + -(cd $(WINPY_DIR) && Scripts/pip3.exe freeze) + rm $(WINPY_DIR)/requirements.txt (cd $(SERVER_DIRECTORY)/setup/win32 && $(LAUNCH_MAKENSIS)) (cd $(SERVER_DIRECTORY)/setup/win32 && mkdir -p $(FILES_DIRECTORY)) (cd $(SERVER_DIRECTORY)/setup/win32 && cp openerp-*.exe $(FILES_DIRECTORY)/openerp-server-setup-$(VERSION).exe) |
