Package: python-llvm Version: 0.12.7-2 Tags: patch The version string is contained in the file llvm/_version.py. In the tarball downloaded from Github this already looks like 'tag: 0.12.7'. I found out that the "official" tarball provided by upstream on PyPI [1] contains the correct version string.
So either a different source archive can be used, or the version string can be corrected before building the package. I attached two patches for both ways. One modifies the watch file to look for new versions on PyPI instead of Github. The other one adds a override_dh_auto_configure section to debian/rules, which corrects the version strings. [1] https://pypi.python.org/pypi/llvmpy/
diff --git a/debian/rules b/debian/rules index d7d9c68..9c73a24 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,11 @@ %: LLVM_CONFIG_PATH=/usr/bin/llvm-config-3.4 dh $@ --with python2 +override_dh_auto_configure: + # _version.py contains "tag: " in the version string (#759020) + sed -i 's/^git_refnames.*tag: \([0-9]\+.[0-9]\+.[0-9]\+\).*/git_refnames = "\1"/g' llvm/_version.py + dh_auto_configure + override_dh_strip: dh_strip --dbg-package=python-llvm-dbg
diff --git a/debian/watch b/debian/watch index ba14204..da201d8 100644 --- a/debian/watch +++ b/debian/watch @@ -1,3 +1,3 @@ version=3 -opts=filenamemangle=s/.+\/v?(.*)\.tar\.gz/llvmpy-$1.tar.gz/ \ - https://github.com/llvmpy/llvmpy/tags .*/v?(\d[\d\.]+)\.tar\.gz +opts=uversionmangle=s/(rc|dev|a|b|c)/~$1/ \ +https://pypi.python.org/packages/source/l/llvmpy/llvmpy-(.*)\.(?:tar\.gz|zip|tar\.bz2)
signature.asc
Description: OpenPGP digital signature

