Installing .py modules with Setup.in and Makefile.pre.in
Ben Gertzfield
che at debian.org
Mon Jan 10 12:51:24 EST 2000
More information about the Python-list mailing list
Mon Jan 10 12:51:24 EST 2000
- Previous message (by thread): no return values for __init__ ??
- Next message (by thread): Using PyString_AsString? Very Simple.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hey, folks. I'm trying to create a module that will install both a shared library Python module built from C sources *and* a few pure-Python modules at once. The documentation doesn't seem to say how, and I can't find any examples of what to put into Setup.in to have it install both C-built modules *and* pure-Python modules. Here's what I've got now, for just the C modules: # Setup.in file for the CDDB Python module # Please uncomment the lines that pertain to your OS! *shared* # For Win32, you'll just need to copy the files 'win32/mci.dll' and # 'win32/cdrom.py' to your Python module path by hand, or re-build # the mci.dll file using the mci.dsp project file. # Linux module cdrom linux/cdrommodule.c -DLINUX # Solaris module # cdrom linux/cdrommodule.c -DSOLARIS *snip* I've tried just putting the names of my python modules in on separate lines, but then the Makefile tries to build them as .so shared libraries containing no object files. :) Is there any way to do this? Do I have to just tell folks to copy the resultant .so library and all the .py files to their site-python directory? For what it's worth, my module's at: http://csl.cse.ucsc.edu/~ben/python/cddb.html I'm also interested in knowing if the "guess-and-uncomment" method I'm using above in the Setup.in is the best way to detect different operating systems. The code that I'm running really needs to know what OS it's on, but I'm not sure how best to detect that, so I just went with the good old "make the user uncomment their own darned lines" method. :) And finally, what to do about the win32 users? I've provided a 'makefile' of sorts (a Microsoft Developer Studio project file) but I doubt this will play well with the Makefile.pre.in style of building. For now, I'm just figuring I'll include both the binary and source of the win32 version of the module, and let the users copy them by hand. (yuck!) Thanks, Ben -- Brought to you by the letters H and G and the number 4. "A squib is a firecracker." Debian GNU/Linux maintainer of Gimp and GTK+ -- http://www.debian.org/
- Previous message (by thread): no return values for __init__ ??
- Next message (by thread): Using PyString_AsString? Very Simple.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list