[Distutils] Limitations of setup_requires
Phillip J. Eby
pje at telecommunity.com
Mon Oct 2 03:40:28 CEST 2006
At 06:20 PM 10/1/2006 -0700, Joshua Boverhof wrote:
>Yes it is since I'm "generating" code when I do
Okay, then before you call setup() in your setup script, create an instance
of setuptools.dist.Distribution() that has setup_requires set, but doesn't
include any packages; and don't do anything besides create it. Then, run
your package generation, and finally run setup(). You do not need a custom
Distribution subclass, as far as I can tell.
The only disadvantage to doing it this way is that if somebody does
"setup.py --help", your package is still going to do dependency downloads
and code generation. But then, that also happens the way you're doing it now.
More information about the Distutils-SIG