2

How would I create a Python Distro like ActivePython?

Basically its only for linux (Centos 5) platforms. Ideally it should work like ActivePython, as in I could just untar it on a location, e.g a nfs share /path/to/python, and get my scripts to use it?

This usually is a common scenario in enterprise environments, where they dont want you to touch the standard servers builds, e.g don't install anything using RPMs / pollute the /usr/local ... etc.

Sure, I could just download & use ActivePython, but I'm more interested in the process behind creating such distros.

EDIT: This is also the main reason I can't use the EPEL Python 2.6 Packages. sigh

0

1 Answer 1

3

Check out this Python build script from github https://github.com/wavetossed/pybuild and run it on a Debian or Ubuntu VM. The Python tarball that results can be run on any Linux including Centos, but the build script itself, needs to be run on a Debian derived system.

Because the build uses RUNPATH/RPATH, it can be untarred into any folder, however one bit of fixup needs to be done to make it run, and that is to run the included patchelf tool to --set-interpreter to use the new path where the binaries live. This only affects the python binary and the patchelf binary, so untar it into /data1/packages/python272 first, run patchelf and then move it to where you want it in the directory tree.

Or, you could just change $TARG before you build it.

Sign up to request clarification or add additional context in comments.

2 Comments

This looks interesting. I'll have a look at it :)
This is actually the best way to do this. Thanks. Will try and do a version for Centos and share it in github.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.