Open tobiasherp opened 4 years ago
A couple of thoughts:
What I've liked about the unified installer is that it makes decisions that are consistent and it is conservative. It is not "latest Plone" and it does not do everything that anyone could possibly want. For those who know enough and who demand the ability to install latest Python and place it in different locations, etc., they can start with what the unified installer does and can either make local changes after the fact or can fork the unified installer and do what they need in their own fork. It's not just because I'm lazy but I do not think the unified installer maintainer(s) should be asked to test even more options.
However, if there is a way to ensure that only Python versions that Plone has been successfully tested with are easily added to the installer, that would be excellent.
Also, if there is a way to set up automated testing here so that we can know for sure that, wherever Python gets installed, things are known to work, that too would be excellent.
So really the next step is to set up automated testing.
Specifically referencing Steve's comment about testing: https://community.plone.org/t/unified-installer-python-version/12849/16?u=tkimnguyen
Currently the installer is not very flexible when it comes to the creation of a Python interpreter:
Python-x.z
directory in the created Plone directory.Since we create a virtualenv anyway, we should be able to create the Python build in some more generic place, e.g. the
/opt/
directory.Furthermore, the buildable Python 2 and 3 versions are hardcoded (using
PYTHON_MD5
andPYTHON3_MD5
variables, among others, which is not very maintainable). IMO, the installer should be able to buildMy changed
main_install_script.sh
so far--python-prefix
option, e.g. to create the interpreter in the/opt/
directoryx.y.z
specification is accepted if theMD5
hash is known (in thePYTHON_MD5[x.y.z]
array variable)x.y
specification is fed into theBEST_PYTHON
variable to find out about the newestx.y.z
release.E.g., with the options
--python-prefix=/opt/ --build-python=3.7
(run asroot
), it will create a Python 3.7.9 interpreter (BEST_PYTHON[3.7]
) in the/opt/Python-3.7
directory (WANT_PYTHON
automatically adjusted accordingly).There are no double sets of
PYTHON_…
/PYTHON3_…
variables anymore. We could easily support new Python releases by adding aPYTHON_MD5[3.x.y]
line and update aBEST_PYTHON[3.x]
entry while still supporting the build of the previously-best Python release.I'd like to add a
python-only
installation method as well. One might want to create a Python in/opt/
, requiringroot
permissions, but a non-root Plone installation.