Actually, you need to specify the version of the Python eggs you want to install. This it to make the buildout profile reproducible
(instead of just installing the last version of the eggs, which will change the next time the a new version is released).
[versions]
Django = 4.0.6
If you recompile with slapos node software --all
, you will see another error, the Python packages require by Django:
You have to specify the version of every packages Django need, here is an example with the versions I have chosen:
[versions]
Django = 4.0.6
backports.zoneinfo = 0.2.1
sqlparse = 0.4.2
asgiref = 3.5.2
Note: if the python package you want to install is distributed as a wheel, it will not be considered by default. To force buildout to select it, just add ":whl" at the end of the line.
For example:
[versions]
Django = 4.0.6:whl
Now, you can recompile with:
$ slapos node software --all
No errors are expected.
Your code should now match the commit: Add versions in software.cfg.
Tip: Find Django eggs versions
To find versions of Django packages easily, you can add allow-picked-versions
option in [buildout]
section:
[buildout]
...
allow-picked-versions = true
The software will be compiled with:
$ slapos node software --all
The versions chosen will be displayed in the console during compilation.
If the Python package is a wheel, allow-picked-version does not allow to install it, you will have to add ":whl" at the end of the version.
To make the installation reproducible, erase allow-picked-versions
and add versions of packages.
[versions]
Django = 4.0.6
backports.zoneinfo = 0.2.1
sqlparse = 0.4.2
asgiref = 3.5.2