[Distutils] Using code from a dependency in setup.py

zooko zooko at zooko.com
Wed May 29 23:48:00 CEST 2013


Here is my explanation of why it can be problematic if you import Bread in
Bread's setup.py:

https://bugs.launchpad.net/nevow/+bug/812537/comments/3

If you do want to import dependencies of Bread in Bread's setup.py, and if your
build tool (e.g. setuptools) supports it, then you could add the dependencies
to the "setup_requires" list.

If possible, maybe you could move some of this work from setup.py-time (whether
build-time or install-time) to "first time I run" or a custom "initialize me
now" command of Bread. I think setup.py is a sub-optimal place to do stuff,
because there are a lot of complicated things going then and there, and because
it is very inconvenient to write unit tests of setup.py behavior.

Regards,

Zooko


More information about the Distutils-SIG mailing list