[Pythonmac-SIG] Installing "fat" python extensions with distutils?
matthias.oberlaender@daimlerchrysler.com
matthias.oberlaender at daimlerchrysler.com
Mon Sep 26 11:41:45 CEST 2005
We use the same (!) Python version in a mixed computing environment, i.e.
we are having Linux, Mac and Windows XP.
And we push sharing code in an "ad hoc" fashion (in addition to the more
"correct" but inert patterns involving cvs):
Whenever a collegue thinks some Python script or module might be of common
interest, he/she will copy it to his personal directory located under a
common root directory mounted writable on all platforms. This kind of
"installation" has the benefit that everybody in our team gains immediate
access, without prior pulling of sources from cvs and executing setup.py,
etc.
So, many scripts can transparently work on all three platforms given that
the common root directory is on each user's python search path. The
imports of such scripts looks like this:
from arthur.utils import ...
from bill.utils import ...
This scheme works very well for pure Python, but I would like to allow
Python extensions, too, i.e. those with ending "so" or "dll". (Extensions
are mostly built using swig,) Unfortunetely, OS X and Linux share the same
file type, but their content is a very different beast! This probably
means that each extension must become a package with a code snippet in the
__init__ module redirecting to the appropriate shared library. Right?
Also I would rather use distutils than manual copying.
So the qestion is: Can I configure my sources in an easy way that calling
'setup.py install' multiple times on the indentical directory, but from
different host types (Linux/Mac/Win) would produce a "fat" Python
extension in an identical target directory?
Before I start fiddling around with distutils and use it in the wrong way,
could anybody with enough experience be so kind and make some suggestions?
Thanks,
Matthias
More information about the Pythonmac-SIG
mailing list