[Distutils] compiling extension for app

Greg Ward gward@python.net
Tue Nov 7 21:39:01 2000


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 ...