If you want to work (or try to find some bugs in it to help out) with the latest bleeding-edge Distutils trunk version that will be shipped with Python 2.7 and Python 3.2, you can do it now !
I am creating a nighlty build every day here now : http://nightly.ziade.org/
This distribution can be installed in your existing Python 2.6 installation, and will probably work with 2.5.
I’m not planning to publish standalone versions yet, except nighlty build, at least until 2.7 and 3.2 are starting to be released as alphas.



Hello Tarek,
Is there any guide/tutorial/documentation to distutils usage?
I’m specially interested, in the kind of tricks that are needed to make string substitutions in source files to installed files. For example, I would like to write into the installed files the version number of the package that could have been previously parsed from the debian/changelog file in setup.py code.
I’ve already seen some code that does similar things, but I would like to get some information in order to understand it better.
Thanks & regards,
Javier
Comment by jcollado — July 10, 2009 @ 3:36 pm |
Hello Javier,
You can start at http://docs.python.org/distutils/
Now for string substitution using the distribution version, I’d recommend setting the version in a __version__ variable and use it in your modules. Is that what you want to do ?
Cheers
Comment by Tarek Ziadé — July 12, 2009 @ 6:55 am |
Hello Tarek,
Thanks for your response. What I would like to do is having a __version__ variable whose value is neither hardcoded in the code nor uses any string substitution provided by the VCS, but that is set on build time to the value that is parsed from another file that isn’t part of the code distribution (debian/changelog in this case).
I’ve already taken a look at the official python documentation. Unfortunately, distutils.cmd isn’t yet complete and I’d like to have a deeper understanding of how distutils library works.
Best regards,
Javier
Comment by jcollado — July 13, 2009 @ 8:50 am |