Greg Ewing <greg.ew...@canterbury.ac.nz> writes:

> In my projects I tend to keep the definitive version number in the
> Makefile, and have a make target that generates a version.py file from
> it. This is convenient because the Makefile often needs the version
> number for other things like creating release tarballs. Tagging vcs
> commits would be another use.

I often do something similar, but IMO simpler: the definitive version
string (note: version strings are rarely single numbers!) is kept as the
sole content of a file at the top of the project tree, named ‘version’.

That way, it's available equally to anything that can read text content
from a file – the Makefile, any program code, even many configuration
files.

-- 
 \       “I went to a general store. They wouldn't let me buy anything |
  `\                                     specifically.” —Steven Wright |
_o__)                                                                  |
Ben Finney

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to