At 02:16 PM 8/16/2009 -0600, Zooko Wilcox-O'Hearn wrote:
So it appears to me that none of these techniques are both modular/ testable and compatible with distutils/setuptools/Distribute. What
are we to do?

We could be modular if there was a way to specify pre-setup.py dependencies. Unfortunately, there isn't such a thing at the moment, short of calling setup() twice, and forcing the first call to have no script arguments, just a setup_requires argument.

Of course, that'd only work if setuptools were present, and it would also force an immediate download of the build dependencies in question. Something like:

  try:
      from setuptools import Distribution
  except ImportError:
      pass
  else:
      Distribution(dict(setup_requires=[...]))

If you want to get fancy, you could replace the "pass" with printing some user-readable instructions after attempting to see if your build-time dependencies are already present.

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to