plone / Installers-UnifiedInstaller

Linux/BSD/OSX Installer
28 stars 24 forks source link

More flexibility for Python interpreter creation #109

Open tobiasherp opened 4 years ago

tobiasherp commented 4 years ago

Currently the installer is not very flexible when it comes to the creation of a Python interpreter:

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 and PYTHON3_MD5 variables, among others, which is not very maintainable). IMO, the installer should be able to build

My changed main_install_script.sh so far

E.g., with the options --python-prefix=/opt/ --build-python=3.7 (run as root), 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 a PYTHON_MD5[3.x.y] line and update a BEST_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/, requiring root permissions, but a non-root Plone installation.

tkimnguyen commented 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.

tkimnguyen commented 4 years ago

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.

tkimnguyen commented 4 years ago

Specifically referencing Steve's comment about testing: https://community.plone.org/t/unified-installer-python-version/12849/16?u=tkimnguyen