Merge lp:~zyga/testtools/use-versiontools into lp:~testtools-committers/testtools/trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~zyga/testtools/use-versiontools |
Merge into: | lp:~testtools-committers/testtools/trunk |
Diff against target: |
77 lines (+3/-51) 1 file modified
setup.py (+3/-51) |
To merge this branch: | bzr merge lp:~zyga/testtools/use-versiontools |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins | Needs Information | ||
Review via email: mp+92824@code.launchpad.net |
Description of the change
This patch switches from using hand-made solution to use versiontools. See the commit message for details.
Unmerged revisions
- 246. By Zygmunt Krynicki
-
Use versiontools instead of hand-made solution.
Versiontools (http://
versiontools. rtfd.org) is centralized system that handles
formatting __version__ appropriately, according to PEP386. Versiontools
includes support for interrogating the version control system, such as bzr, git
or mercurial to retrieve the revision or other commit identifier and append
that to the version string in certain situations.The biggest advantage is that this patch makes testtools work on python3.
Currently versiontools requires bzrlib to be importable to work, so without bzr
available inside your virtualenv (or system installation) you will not get
proper versioning of individual development snapshots (they will be just
labeled 1.2.3.dev instead of 1.2.3.dev{revno}). This requirement will go away
in versiontools 1.10 with shell fall-back as bzr is not coming to python3
anytime soon. This patch also requires setuptools to work properly (as
versiontools depends on setup_requires). This requirement will also go away in
versiontools 1.9, or as soon as
https://code.launchpad .net/~zkrynicki /versiontools/ 1.9/+merge/ 91568 lands in
trunk.
I'm not really a testtools reviewer, but involved in the packaging. Some issues I noticed:
This removes the distinction for version phases ("final", "alpha", etc) and causes the version number to be 0.9.14 for all snapshots following release 0.9.14, rather than snapshot-0.9.14. This in particular matters for recipe builds, where we create a source package without the .bzr directory.
It looks like versiontools isn't packaged for Debian or Ubuntu yet. It would be nice if that could happen before testtools starts depending on it, otherwise we can't upload newer versions to Debian/Ubuntu.