compiling an extension for several versions of python

M

mh

I don't have access to site-packages, but I would like
to provide versions of my c-language package compiled against
python 2.4 and 2.5.

I "own" a library directory which is included in our site's
sys.path. Currently this is where the 2.4 shared libary
is installed.

What's the most canonical way of doing this? This is on linux.

Many TIA!
Mark
 
J

James Stroud

I don't have access to site-packages, but I would like
to provide versions of my c-language package compiled against
python 2.4 and 2.5.

I "own" a library directory which is included in our site's
sys.path. Currently this is where the 2.4 shared libary
is installed.

What's the most canonical way of doing this? This is on linux.

Many TIA!
Mark

Normally, you would make 2 different distros which people could
download, etc. But in this setting, if I get your meaning correctly,
your best bet would be to wrap them in another module and let people
import the wrapper module. The wrapper module would then use one the
following calls to decide which version of your package to import:

py> import sys
py> sys.version
'2.5 (r25:51908, Oct 10 2006, 03:45:47) \n[GCC 4.0.1 (Apple Computer,
Inc. build 5363)]'
py> sys.version_info
(2, 5, 0, 'final', 0)

James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top