summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Monniez <moc@odoo.com>2019-01-28 14:54:09 +0000
committerChristophe Monniez <moc@odoo.com>2019-01-29 09:09:53 +0000
commit7eec6b3643999cb26216e56c001eb8aae65031ea (patch)
treeeff9de9855217b0492be70f7e70ac4562a135163
parent317884be6aa7445d65d67cd638d2d793ab3ff05c (diff)
[FIX] packaging: allow install on fedora29
Fedora 29 switched to python 3.7. It seems that there is no official way to build a RPM package that could works with 3.6 and 3.7. Building two different packages for each version could open the pandora box of packaging. With this commit an ugly hack is used: if python3.7 is found, the odoo directory is symlinked into its site-packages dir. fixes #30579 closes odoo/odoo#30618
-rw-r--r--setup.cfg2
-rw-r--r--setup/redhat/postinstall.sh6
2 files changed, 7 insertions, 1 deletions
diff --git a/setup.cfg b/setup.cfg
index 3994ef225f2..4cce04e18da 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -9,7 +9,7 @@ requires =
nodejs-less
pychart
pyparsing
- python(abi) = 3.6
+ python(abi) >= 3.6
python3-babel
python3-decorator
python3-docutils
diff --git a/setup/redhat/postinstall.sh b/setup/redhat/postinstall.sh
index 54b1b5cd56f..e6ee9106f7d 100644
--- a/setup/redhat/postinstall.sh
+++ b/setup/redhat/postinstall.sh
@@ -10,6 +10,12 @@ ODOO_LOG_DIR=/var/log/odoo
ODOO_LOG_FILE=$ODOO_LOG_DIR/odoo-server.log
ODOO_USER="odoo"
+if [ -d /usr/lib/python3.7 ]; then
+ SITE_PACK_DIR37=/usr/lib/python3.7/site-packages
+ [[ ! -d ${SITE_PACK_DIR37} ]] && mkdir -p ${SITE_PACK_DIR37}
+ ln -s /usr/lib/python3.6/site-packages/odoo ${SITE_PACK_DIR37}/odoo
+fi
+
if ! getent passwd | grep -q "^odoo:"; then
groupadd $ODOO_GROUP
adduser --system --no-create-home $ODOO_USER -g $ODOO_GROUP