Support unavailable
Please try again later

Building an Advanced Python Installation for Linux and Windows

by Anselm Kruis for EuroPython 2012

Without a Python installation you can’t run a Python program. In my talk I’ll present an advanced Python installation and the tools used to build it. My team had the order to develop a completely new commercial (closed source) product using Stackless Python, pyGtk and a bunch of other Python extension modules. (The product uses python scripts to control technical workflows.) We soon decided to develop our own installation technology, because conventional installation concepts didn’t fully meet our requirements:

  • Only two installation packages. One for Windows 32bit starting with XP SP3 and one for Linux x86_64 distributions with glibc 2.3.4 or better (RHEL 4 and up, SLES 10 and up, Debian).

  • Zero installation and no dependency on any non standard system components.

  • Relocatable, runs from any directory in the file system tree.

  • Usable and maintainable for more than 10 years. That means, we must be able to compile everything ourselves to be incessantly able to fix bugs.

  • Adhere to standards (i.e. Python, Posix, Microsoft) wherever possible. Avoid dirty hacks.

Because these requirements are fairly common, our work might be useful for other projects too. We made two packages, one for Windows, one for Linux. Both provide the same functionality, but they differ in their internal structure.

I’ll show you all the problems we encountered, our solutions and various useful tools, some of them we developed ourselves. Main topics are: how to make the installation relocatable on Linux and how to compile for an ancient glibc. How to build it on Windows without violating Microsoft’s recommendation not to mix different versions of the C runtime library. How to avoid the DLL hell. Learn about $ORIGIN-relative RPATH entries, GCC spec file hacks and other tricks.


Do you have some questions on this talk? Leave a comment to the speaker!

New comment

60 minutes (inc Q&A)

Tagged as

case-study deploy
Our Sponsors
Python Experts
SSL Matrix
Wanna sponsor?