By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,172 Members | 762 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,172 IT Pros & Developers. It's quick & easy.

Python C extenstion and

P: n/a
I'm building python extension for some solaris specific functions. My looks like this:

from distutils.core import setup, Extension

sol_ex = Extension('sun.solaris',

setup (name = "solaris",
version = "0.1",
description = "Solaris specifics system calls module",
ext_modules = [ sol_ex ],
After doing the 'python build' successfuly, I setup a test
script that looks like the following :
import sun.solaris

After setting the PYTHONPATH to ./build/lib.solaris-2.9-sun4u-2.3 and
running the, I got the following:

Traceback (most recent call last):
File "", line 1, in ?
import sun.solaris
ImportError: No module named sun.solaris

It turns out that in addition to, I also need
(manually created) in ./build/lib.solaris-2.9-sun4u-2.3 to make the
extension works.

My question is how do I automate the creation (in of so that when I build the extension, it will also creates in the build directory?


Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.