Commit ae465a50 authored by Xavier Thompson's avatar Xavier Thompson

Downgrade pip, wheel and setuptools in python2 SRs

When using slapos.reboostrap to re-launch buildout with the version
of Python that was just installed, zc.buildout and its dependencies
are reinstalled for the new Python with the same egg versions. Thus
SRs which install Python 2 need to use Python-2-compatible versions
of setuptools, pip and wheel all along.

For this stack/slapos-py2.cfg is introduced.

It is also used to move all

```
[openssl]
<= openssl-1.1
```

from individual Python2 SRs to a common place.
parent 89ee3e89
...@@ -15,6 +15,9 @@ extends = ...@@ -15,6 +15,9 @@ extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
dcron dcron
logrotate logrotate
...@@ -27,12 +30,6 @@ parts = ...@@ -27,12 +30,6 @@ parts =
template-crontab-line template-crontab-line
slapos-cookbook slapos-cookbook
[python]
part = python2.7
[openssl]
<= openssl-1.1
[rssgen-eggs] [rssgen-eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
interpreter = python-${:_buildout_section_name_} interpreter = python-${:_buildout_section_name_}
......
...@@ -28,6 +28,9 @@ extends = ...@@ -28,6 +28,9 @@ extends =
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
./buildout.hash.cfg ./buildout.hash.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts += parts +=
slapos-cookbook slapos-cookbook
beremiz-eggs beremiz-eggs
...@@ -41,13 +44,6 @@ parts += ...@@ -41,13 +44,6 @@ parts +=
# Always build GCC for Fortran (see openblas). # Always build GCC for Fortran (see openblas).
max_version = 0 max_version = 0
[python]
# Beremiz works with python2.7 for now, the code is not yet upgraded for python3
part = python2.7
[openssl]
<= openssl-1.1
[open62541] [open62541]
# Beremiz need it to be in folder parts/open62541 # Beremiz need it to be in folder parts/open62541
# as Beremiz search for open62541 to BEREMIZ_PATH/../open62541 # as Beremiz search for open62541 to BEREMIZ_PATH/../open62541
......
...@@ -11,6 +11,9 @@ extends = ...@@ -11,6 +11,9 @@ extends =
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
beremiz-source beremiz-source
slapos-cookbook slapos-cookbook
...@@ -19,12 +22,6 @@ parts = ...@@ -19,12 +22,6 @@ parts =
matiec matiec
open62541 open62541
[python]
part = python2.7
[openssl]
<= openssl-1.1
[gcc] [gcc]
# we want this SR to use a fixed gcc (so that we have the same gcc as open62541 component) # we want this SR to use a fixed gcc (so that we have the same gcc as open62541 component)
max_version = 0 max_version = 0
......
...@@ -3,17 +3,15 @@ extends = ...@@ -3,17 +3,15 @@ extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/vm-img/debian.cfg ../../component/vm-img/debian.cfg
../../component/rina-tools/buildout.cfg ../../component/rina-tools/buildout.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
slapos-cookbook slapos-cookbook
template template
download-cache = ${:directory}/download-cache download-cache = ${:directory}/download-cache
[python]
part = python2.7
[openssl]
<= openssl-1.1
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
......
...@@ -114,6 +114,7 @@ zope.testrunner = 5.2 ...@@ -114,6 +114,7 @@ zope.testrunner = 5.2
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
${:recipe} ${:recipe}
zc.buildout[test]
zope.testing zope.testing
zope.testrunner zope.testrunner
scripts = scripts =
......
...@@ -2,8 +2,5 @@ ...@@ -2,8 +2,5 @@
extends = extends =
software.cfg software.cfg
[python] # Python2 versions for buildout (keep last)
part = python2.7 ../../stack/slapos-py2.cfg
[openssl]
<= openssl-1.1
...@@ -6,6 +6,10 @@ extends = ...@@ -6,6 +6,10 @@ extends =
../../component/manpy/buildout.cfg ../../component/manpy/buildout.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
./buildout.hash.cfg ./buildout.hash.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
slapos-cookbook slapos-cookbook
manpy manpy
...@@ -21,12 +25,6 @@ max_version = 0 ...@@ -21,12 +25,6 @@ max_version = 0
# also use old gcc version for old scipy version used in python2 # also use old gcc version for old scipy version used in python2
part = gcc-8.5 part = gcc-8.5
[python]
part = python2.7
[openssl]
<= openssl-1.1
[dream-repository.git] [dream-repository.git]
revision = f3bcf115741886835df8c0ca0fdbf510d77d8db8 revision = f3bcf115741886835df8c0ca0fdbf510d77d8db8
......
...@@ -2,16 +2,14 @@ ...@@ -2,16 +2,14 @@
extends = extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/rina-tools/buildout.cfg ../../component/rina-tools/buildout.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
slapos-cookbook slapos-cookbook
template template
[python]
part = python2.7
[openssl]
<= openssl-1.1
[file] [file]
# For old GCC like 4.9.2 on Debian 8. # For old GCC like 4.9.2 on Debian 8.
# XXX: This should be moved to component/rina-tools/buildout.cfg, next to where # XXX: This should be moved to component/rina-tools/buildout.cfg, next to where
......
...@@ -23,6 +23,9 @@ extends = ...@@ -23,6 +23,9 @@ extends =
../../component/ZEO/buildout.cfg ../../component/ZEO/buildout.cfg
../../component/zodbtools/buildout.cfg ../../component/zodbtools/buildout.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
# keep neoppod first so that ZODB is built correctly, # keep neoppod first so that ZODB is built correctly,
# before any other section that would depend on it # before any other section that would depend on it
...@@ -30,12 +33,6 @@ parts = ...@@ -30,12 +33,6 @@ parts =
neoppod neoppod
slapos-cookbook slapos-cookbook
[python]
part = python2.7
[openssl]
<= openssl-1.1
[gcc:python2] [gcc:python2]
# use old gcc version for old scipy version used in python2 # use old gcc version for old scipy version used in python2
part = gcc-8.5 part = gcc-8.5
......
...@@ -19,6 +19,8 @@ extends = ...@@ -19,6 +19,8 @@ extends =
../../component/pygolang/buildout.cfg ../../component/pygolang/buildout.cfg
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
gowork gowork
...@@ -47,12 +49,6 @@ parts = ...@@ -47,12 +49,6 @@ parts =
slapos-cookbook slapos-cookbook
instance.cfg instance.cfg
[python]
part = python2.7
[openssl]
<= openssl-1.1
[neo] [neo]
<= go-git-package <= go-git-package
go.importpath = lab.nexedi.com/kirr/neo go.importpath = lab.nexedi.com/kirr/neo
......
...@@ -13,16 +13,13 @@ extends = ...@@ -13,16 +13,13 @@ extends =
# Monitoring stack (keep on bottom) # Monitoring stack (keep on bottom)
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
# Python2 versions for buildout (keep bottom-most)
../../stack/slapos-py2.cfg
parts += parts +=
slapos-cookbook slapos-cookbook
template template
[python]
part = python2.7
[openssl]
<= openssl-1.1
[re6stnet-repository] [re6stnet-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/re6stnet.git repository = https://lab.nexedi.com/nexedi/re6stnet.git
......
...@@ -2,11 +2,8 @@ ...@@ -2,11 +2,8 @@
extends = extends =
software.cfg software.cfg
[python] # Python2 versions for buildout (keep last)
part = python2.7 ../../stack/slapos-py2.cfg
[openssl]
<= openssl-1.1
[extra-eggs] [extra-eggs]
eggs += eggs +=
......
...@@ -6,18 +6,15 @@ extends = ...@@ -6,18 +6,15 @@ extends =
../../component/tsn-rt-measures/buildout.cfg ../../component/tsn-rt-measures/buildout.cfg
../../component/util-linux/buildout.cfg ../../component/util-linux/buildout.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
slapos-cookbook slapos-cookbook
eggs eggs
util-linux util-linux
template template
[python]
part = python2.7
[openssl]
<= openssl-1.1
# eggs for instance-rsn-client.cfg # eggs for instance-rsn-client.cfg
[eggs] [eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
......
...@@ -6,16 +6,13 @@ extends = ...@@ -6,16 +6,13 @@ extends =
../../component/zabbix/buildout.cfg ../../component/zabbix/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
# Python2 versions for buildout (keep last)
../../stack/slapos-py2.cfg
parts = parts =
slapos-cookbook slapos-cookbook
template template
[python]
part = python2.7
[openssl]
<= openssl-1.1
[template] [template]
# Default template for the instance. # Default template for the instance.
recipe = slapos.recipe.template recipe = slapos.recipe.template
......
...@@ -68,6 +68,9 @@ extends = ...@@ -68,6 +68,9 @@ extends =
../../software/neoppod/software-common.cfg ../../software/neoppod/software-common.cfg
# keep neoppod extends last # keep neoppod extends last
# python2
../slapos-py2.cfg
parts += parts +=
erp5-util-develop erp5-util-develop
slapos-cookbook slapos-cookbook
......
[buildout]
extends = slapos.cfg
[python]
part = python2.7
[openssl]
<= openssl-1.1
# Use Python2-compatible versions of zc.buildout dependencies from the start.
# These versions must be pinned unconditionally because slapos.rebootstrap
# will necessarily keep the same versions of zc.buildout and dependencies
# with the new Python. This is an intrisic limitation of slapos.rebootstrap.
[versions]
setuptools = 44.1.1
pip = 20.3.4
# Avoid https://github.com/pypa/wheel/issues/331
wheel = 0.33.6
...@@ -413,7 +413,6 @@ statsmodels = 0.11.1 ...@@ -413,7 +413,6 @@ statsmodels = 0.11.1
traitlets = 4.3.3 traitlets = 4.3.3
uritemplate = 3.0.0 uritemplate = 3.0.0
Werkzeug = 1.0.1 Werkzeug = 1.0.1
wheel = 0.35.1:whl
zipp = 1.2.0:whl zipp = 1.2.0:whl
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment