extension: How to set up additional dependencies in Setup.in

Dave Kuhlman dkuhlman at rexx.com
Tue May 22 12:34:36 EDT 2001

"distutils intead of Setup"?  I thought setup.py was part of

Here is another distutils question:  I have to tell users of my
Python extension (PySgrep, available at
http://www.rexx.com/~dkuhlman/pysgrep-1.0a.tar.gz) to run
"./configure" before running "python setup.py build".  It's
difficult to make that obvious enough so that no one fails to see
it and wastes time trying to figure out a not so obvious error
message.  So, is there a way to get setup.py to run "./configure"
(or any other script or program) before or after a build?

Distutils, by the way, is great.  My thanks to its designers and
implementers.  Biologists must have a word to describe something
like this that helps an organism become viral.  I believe that
distutils will contribute heavily to the spread of the Python

  - Dave

Martin von Loewis <loewis at informatik.hu-berlin.de> wrote:
> Harald Kirsch <kirschh at lionbioscience.com> writes:
>> I am implementing a python extension. It contains python specific code
>> as well as python independent code. The independent code is captured
>> in a library. How can I state that the module's shared object is
>> dependent on the library (except by hacking the Makefile)?
> I recommend using distutils instead of Setup. I don't know whether it
> already checks for timestamp dependencies between a shared object and
> its libraries, but:
> a) a patch to distutils performing such checks likely would be
>    accepted, and
> b) if distutils currently does such dependencies, you could easily
>    override the build_ext command to perform the dependency check
>    yourself.
> Regards,
> Martin

Dave Kuhlman
dkuhlman at rexx.com

More information about the Python-list mailing list