[Python-Dev] Binary CPython distribution for Linux

Bohuslav Kabrda bkabrda at redhat.com
Fri Jun 27 09:07:23 CEST 2014


----- Original Message -----
> While much of the opposition to dropping Python <2.7 stems from the RHEL
> community (they still have 2.4 in extended support and 2.7 wasn't in a
> release until a few weeks ago), a common objection from the users is "I
> can't install a different Python" or "it's too difficult to install a
> different Python." The former is a legit complaint - if you are on
> shared hosting and don't have root, as easy as it is to add an alternate
> package repository that provides 2.7 (or newer), you don't have the
> permissions so you can't do it.

It's not true that 2.7 wasn't released until few weeks ago. It was released few weeks ago as part of RHEL 7, but Red Hat has been shipping Red Hat Software Collections (RHSCL) 1.0, that contain Python 2.7 and Python 3.3, for almost a year now [1] - RHSCL is installable on RHEL 6; RHSCL 1.1 (also with 2.7 and 3.3) has been released few weeks ago and is supported on RHEL 6 and 7. Also, these collections now have their community rebuilds at [2], so you can just download them without needing to talk to Red Hat at all. But yeah, these are all RPMs, so you have to be root to install them.

> I'd like to propose a solution to this problem: a pre-built distribution
> of CPython for Linux available via www.python.org in the list of
> downloads for a particular release [5]. This distribution could be
> downloaded and unarchived into the user's home directory and users could
> start running it immediately by setting an environment variable or two,
> creating a symlink, or even running a basic installer script. This would
> hopefully remove the hurdles of obtaining a (sane) Python distribution
> on Linux. This would allow projects to more easily drop end-of-life
> Python versions and would speed adoption of modern Python, including
> Python 3 (because porting is much easier if you only have to target 2.7).
> 
> I understand there may be technical challenges with doing this for some
> distributions and with producing a universal binary distribution. I
> would settle for a binary distribution that was targeted towards RHEL
> users and variant distros, as that is the user population that I
> perceive to be the most conservative and responsible for holding modern
> Python adoption back.

Speaking with my Fedora/RHEL/RHSCL Python maintainer's hat on, prebuilding Python is not as easy task as it may seem :) Someone has to write the build scripts (e.g. sort of specfile, but rpm/specfile wouldn't really work for you, since you want to install in user's home dirs). Someone has to update them when new Python comes out, so in the worst case you end up with slightly different build scripts for different versions of Python. Someone has to do rebuilds when there is CVE. Or a bug. Or a user requests a feature that makes sense. Someone has to do that for *each packaged version* - and each packaged version needs to be maintained for some amount of time so that it all actually makes sense.
Maintaining a prebuilt distribution of Python is a time consuming task even if you do it just for one Linux distro. If you want to maintain a *universal* prebuilt Python distribution, then you'll find out that it's a) undoable b) consumes so many resources and it's so fragile, that it's probably not worth it. You could just bundle all Python dependencies into your distribution to make it "easier", but that would just make the result grow in size (perhaps significantly) and you would then also need to update/bugfix/securityfix the bundled dependencies (which would consume even more time).
Please don't take this as a criticism of your ideas, I see what you're trying to solve. I just think the way you're trying to solve it is unachievable or would consume so much community resources, that it would end up unmaintained and buggy most of the time.

-- 
Regards,
Bohuslav "Slavek" Kabrda.

[1] http://developerblog.redhat.com/2013/09/12/rhscl1-ga/
[2] https://www.softwarecollections.org/en/scls/


More information about the Python-Dev mailing list