473,241 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

compiling an extension for several versions of python

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

--
Mark Harrison
Pixar Animation Studios
Sep 12 '07 #1
1 959
mh@pixar.com wrote:
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:

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

James
Sep 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jon Nicoll | last post by:
Hi all anyone know what compiler and version I should use to compile an extension module for ActiveState Python 2.3? <background> quite a few years ago I used a useful Python extension module...
6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
by: Neal Norwitz | last post by:
If you don't write or otherwise maintain Python Extension Modules written in C (or C++) or embed Python in your application, you can stop reading. Python 2.5 alpha 1 was released April 5, 2006. ...
0
by: follower | last post by:
This post is mostly Google-bait for anyone else that might want to compile SpiderMonkey ( libjs / libjs.so / libjs.dylib ) for OS X (10.4.5 in my case) and then use it with Python's ctypes. I can't...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.