compiling extension for app

is there a simple way to get distutils to compile an extension for my end-user app? i need a small extension compiled and just placed in the current directory (not installed to PYTHONHOME) i'm not sure if distutils supports anything like this, but i imagine someone out there has done something similar? i'd be glad to get my hands on some info or examples, thanks

Pete Shinners wrote:
is there a simple way to get distutils to compile an extension for my end-user app? i need a small extension compiled and just placed in the current directory (not installed to PYTHONHOME)
i'm not sure if distutils supports anything like this, but i imagine someone out there has done something similar? i'd be glad to get my hands on some info or examples, thanks
There might be also a simpler way to do this, but I have for this purpose a tiny shell script. install-here.sh --------------------------------- #!/bin/sh python setup.py install --install-base . --install-lib . --install-data . --install-headers . --install-scripts . --------------------------------- So I can always test a local installation (if it is a package). May be the parameters for build (build-base,build-lib) are that what you need. Kind regards Rene Liebscher

On 17 October 2000, Pete Shinners said:
is there a simple way to get distutils to compile an extension for my end-user app? i need a small extension compiled and just placed in the current directory (not installed to PYTHONHOME)
The Big Question of dealing with Python applications in general -- as opposed to Python modules -- has not really been addressed. (The main difference, as I see it, is that modules get installed to the standard directory for third party modules, whereas applications should get their own installation tree. The main outcome of this is that scripts included with applications would need to be hacked at install-time [automatically, by the Distutils, of course!] to find the right modules.) However, don't let that stop you. If all you want to do is build an extension to the "current directory" without installing it, this should work: python setup.py build_ext --inplace as long as "current directory" means "the directory where the extension source file lives". ;-) Greg -- Greg Ward - programmer-at-large gward@python.net http://starship.python.net/~gward/ ... bleakness ... desolation ... plastic forks ...
participants (3)
-
Greg Ward
-
Pete Shinners
-
Rene Liebscher