diff options
| author | Christophe Monniez <moc@odoo.com> | 2019-10-30 14:30:02 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-11-05 17:29:31 +0000 |
| commit | 7ce07a7a1a9244068c88ba316c17b13d1e091af8 (patch) | |
| tree | 3cea42d3e224078e990b8d6cc725119ac85d1b5e /setup | |
| parent | 0a3ca7df7a11652cfc86d398a91b098d516ed476 (diff) | |
[FIX] packaging: compute winpython path with package.py args
When building the MS Windows package, the PYTHON_VERSION variable is not
used and the WinPython path is hard coded in the Makefile and NSI file.
This prevent the usage of a newer version of Python.
With this commit, the PYTHON_VERSION is used to compute the WinPython
Python directory. That way, this directory can be derived from
package.py command line argument --vm-winxp-python-version.
Also the less windows binaries are not packaged anymore.
closes odoo/odoo#39821
X-original-commit: ac90d8584f99e24aed931eb5186c360f9dfbf399
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Diffstat (limited to 'setup')
| -rwxr-xr-x | setup/package.py | 4 | ||||
| -rw-r--r-- | setup/win32/Makefile | 4 | ||||
| -rwxr-xr-x | setup/win32/setup.nsi | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/setup/package.py b/setup/package.py index 5f4f8e5375d..36ccc7e528c 100755 --- a/setup/package.py +++ b/setup/package.py @@ -437,7 +437,7 @@ class KVMWinBuildExe(KVM): with open(os.path.join(self.args.build_dir, 'setup/win32/Makefile.version'), 'w') as f: f.write("VERSION=%s\n" % VERSION.replace('~', '_').replace('+', '')) with open(os.path.join(self.args.build_dir, 'setup/win32/Makefile.python'), 'w') as f: - f.write("PYTHON_VERSION=%s\n" % self.args.vm_winxp_python_version.replace('.', '')) + f.write("PYTHON_VERSION=%s\n" % self.args.vm_winxp_python_version) with open(os.path.join(self.args.build_dir, 'setup/win32/Makefile.servicename'), 'w') as f: f.write("SERVICENAME=%s\n" % nt_service_name) @@ -494,7 +494,7 @@ def parse_args(): ap.add_argument("--vm-winxp-image", default='/home/odoo/vm/win1036/win10_winpy36.qcow2', help="%(default)s") ap.add_argument("--vm-winxp-ssh-key", default='/home/odoo/vm/win1036/id_rsa', help="%(default)s") ap.add_argument("--vm-winxp-login", default='Naresh', help="Windows login %(default)s") - ap.add_argument("--vm-winxp-python-version", default='3.6', help="Windows Python version installed in the VM (default: %(default)s)") + ap.add_argument("--vm-winxp-python-version", default='3.7.4', help="Windows Python version installed in the VM (default: %(default)s)") ap.add_argument("-t", "--test", action="store_true", default=False, help="Test built packages") ap.add_argument("-s", "--sign", action="store_true", default=False, help="Sign Debian package / generate Rpm repo") diff --git a/setup/win32/Makefile b/setup/win32/Makefile index 3644d7fe0db..94c5facadb0 100644 --- a/setup/win32/Makefile +++ b/setup/win32/Makefile @@ -5,10 +5,10 @@ include Makefile.servicename SERVER_DIRECTORY=../.. FILES_DIRECTORY=release -MAKENSIS_ARGUMENTS=/DVERSION=$(VERSION) /DSERVICENAME=${SERVICENAME} +MAKENSIS_ARGUMENTS=/DVERSION=$(VERSION) /DSERVICENAME=${SERVICENAME} /DPYTHONVERSION=${PYTHON_VERSION} LAUNCH_MAKENSIS=/cygdrive/c/tools/cygwin/makensis $(MAKENSIS_ARGUMENTS) setup.nsi -WINPY_DIR=/cygdrive/c/odoobuild/WinPython/python-3.6.2 +WINPY_DIR=/cygdrive/c/odoobuild/WinPython/python-${PYTHON_VERSION} default: allinone diff --git a/setup/win32/setup.nsi b/setup/win32/setup.nsi index a2095e98833..04da25eaf6b 100755 --- a/setup/win32/setup.nsi +++ b/setup/win32/setup.nsi @@ -208,7 +208,7 @@ Section $(TITLE_OpenERP_Server) SectionOpenERP_Server # Installing winpython
SetOutPath "$INSTDIR\python"
- File /r /x "__pycache__" "..\..\..\WinPython\python-3.6.2\*"
+ File /r /x "__pycache__" "..\..\..\WinPython\python-${PYTHONVERSION}\*"
SetOutPath "$INSTDIR\nssm"
File /r /x "src" "..\..\..\nssm-2.24\*"
@@ -229,7 +229,6 @@ Section $(TITLE_OpenERP_Server) SectionOpenERP_Server SetOutPath "$INSTDIR\thirdparty"
File /r "${STATIC_PATH}\wkhtmltopdf\*"
- File /r "${STATIC_PATH}\less\*"
# If there is a previous install of the OpenERP Server, keep the login/password from the config file
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_host" $TextPostgreSQLHostname
|
