On 14 June 2002, Fredrik Lundh said:
alex wrote:
The "problem" (:-) is that it's great at just building extensions, too.
python2.1 setup.py install, python2.2 setup.py install, python2.3 setup.py install, and hey pronto, I have my extension built and installed on all Python versions I want to support, ready for testing. Hard to beat!-)
does your code always work right away?
If we're talking about a downloaded third party extension -- the main use case for the Distutils -- one certainly hopes so! It's only a happy accident that the Distutils are moderately useful for building/development.
I tend to use an incremental approach, with lots of edit-compile-run cycles. I still haven't found a way to get the damn thing to just build my extension and copy it to the current directory, so I can run the test scripts.
Last time I checked: python setup.py build_ext --inplace
(distutils is also a pain to use with a version management system that marks files in the repository as read-only; distutils copy function happily copies all the status bits. but the remove function refuses to remove files that are read-only, even if the files have been created by distutils itself...)
Yeah, that's a stupid situation. I'm sure there are "XXX" comments in the code where I ponder the wisdom of preserving mtime and mode. Greg -- Greg Ward - just another Python hacker gward@python.net http://starship.python.net/~gward/