[reportlab-users] 2.2 - distutils versus setuptools

Dirk Holtwick dirk.holtwick at gmail.com
Thu Sep 4 16:15:24 EDT 2008


Andy Robinson schrieb:

> (b) we keep the official "version number" in reportlab/__init__.py

> (which I just bumped to "2.2pre"). Either the setup info should

> pull it from there (which is what Django's script does), or the

> setup_version.py script should modify the copy in the code.

> Not sure which yet.


I have chosen to use the setup_version.py string because of some reasons:

- I often experienced problems importing a Python module that should be
installed in the very same script. For example if you import your
__init__.py file which contains the version number this file might try
to import other modules that are not yet installed. I prefer the
setup.py file to be independent from the package that will be installed.

- If I want to use the version number in the documentation (I write it
in HTML and then convert them to PDF via pisa, see there
http://www.htmltopdf.org/) then it is useless to have the version number
in a Python module.

- Another nice feature is, that the script offers a simple way to write
a continuous build number and the current date and time. This makes
identifying ad hoc distributions to be identified much easier.

Just add all files that should be updated in these lines like this:

FILES = [
"setup_egg.py",
"src/reportlab/__init__py",
]

Dirk


More information about the reportlab-users mailing list