Source: setuptools-scm Severity: wishlist It is unclear to me how this package is supposed to be used to build native packages in Debian.
Most packages I see in Debian seem to break the "rule" of "don't commit the version file into version control": https://codesearch.debian.net/search?q=don%27t+track+in+version+control I am trying to use this for the Monkeysign package, and I don't have a "master" branch that is separate from upstream: this is a native package. If I skip including the generated file in version control, I get this: LookupError: setuptools-scm was unable to detect version for '/home/anarcat/src/build-area/monkeysign-2.1.4'. What's the prefered way to manage this? I have this in my setup.py: use_scm_version={ 'write_to': 'monkeysign/_version.py', }, But even without that, the thing fails on build: [831]anarcat@angela:monkeysign(2.x $>)$ DIST=sid ARCH=amd64 git-buildpackage --git-debian-branch=2.x dh clean --with=python2,sphinxdoc dh_testdir dh_auto_clean your setuptools is too old (<12) setuptools_scm functionality is degraded running clean 'build/lib.linux-x86_64-2.7' does not exist -- can't clean it 'build/bdist.linux-x86_64' does not exist -- can't clean it 'build/scripts-2.7' does not exist -- can't clean it dh_clean gbp:info: Exporting 'HEAD' to '/home/anarcat/src/build-area/monkeysign-tmp' gbp:info: Moving '/home/anarcat/src/build-area/monkeysign-tmp' to '/home/anarcat/src/build-area/monkeysign-2.1.4' Building with cowbuilder for distribution sid, architecture amd64 I: using cowbuilder as pbuilder dpkg-buildpackage: source package monkeysign dpkg-buildpackage: source version 2.1.4 dpkg-buildpackage: source distribution unstable dpkg-buildpackage: source changed by Antoine Beaupré <anar...@debian.org> dpkg-source --before-build monkeysign-2.1.4 fakeroot debian/rules clean dh clean --with=python2,sphinxdoc dh_testdir dh_auto_clean your setuptools is too old (<12) setuptools_scm functionality is degraded Traceback (most recent call last): File "setup.py", line 81, in <module> test_suite='tests', File "/usr/lib/python2.7/distutils/core.py", line 111, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 266, in __init__ _Distribution.__init__(self,attrs) File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__ self.finalize_options() File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 301, in finalize_options ep.load()(self, ep.name, value) File "/usr/lib/python2.7/dist-packages/setuptools_scm/integration.py", line 19, in version_keyword dist.metadata.version = get_version(**value) File "/usr/lib/python2.7/dist-packages/setuptools_scm/__init__.py", line 102, in get_version version = _do_parse(root, parse) File "/usr/lib/python2.7/dist-packages/setuptools_scm/__init__.py", line 80, in _do_parse "use git+https://github.com/user/proj.git#egg=proj" % root) LookupError: setuptools-scm was unable to detect version for '/home/anarcat/src/build-area/monkeysign-2.1.4'. Make sure you're not using GitHub's tarballs (or similar ones), as those don't contain the necessary metadata. Use PyPI's tarballs instead. For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj dh_auto_clean: python setup.py clean -a returned exit code 1 debian/rules:11: recipe for target 'clean' failed make: *** [clean] Error 1 dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2 gbp:error: '/usr/bin/git-pbuilder' failed: it exited with 2 -- System Information: Debian Release: 8.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable'), (1, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.6.0-0.bpo.1-amd64 (SMP w/2 CPU cores) Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)