[Python-modules-team] Bug#933739: setuptools_scm can't parse version "debian/1.9-4"
Pierre-Elliott Bécue
peb at debian.org
Fri Aug 2 19:07:16 BST 2019
Source: setuptools-scm
Severity: important
Dear maintainer,
setuptools_scm has a trouble parsing git tags like "debian/1.9-4",
because the regexp isn't permissive enough.
This prevents to build some packages like fava without modifying
setup.py or setup.cfg to not fetch the version from git tags.
See the following build log:
.-(19:42:17)-(~/git/debian/python-team/applications/fava/fava)------------------------------------------------------------------------(git)-[fava/debian/master]-(becue at dawaj)-
`---> sbuild -As
dpkg-source: info: using options from fava/debian/source/options: --extend-diff-ignore=^[^/]+.egg-info/
dh clean --with python3 --buildsystem=pybuild
debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/becue/git/debian/python-team/applications/fava/fava'
dh_auto_clean
I: pybuild base:217: python3.7 setup.py clean
/usr/lib/python3/dist-packages/setuptools_scm/version.py:92: UserWarning: tag 'debian/1.9-4' no version found
warnings.warn("tag %r no version found" % (tag,))
/usr/lib/python3/dist-packages/setuptools_scm/version.py:92: UserWarning: tag 'debian/1.9-4' no version found
warnings.warn("tag %r no version found" % (tag,))
Traceback (most recent call last):
File "setup.py", line 7, in <module>
setup()
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 121, in setup
dist.parse_config_files()
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 705, in parse_config_files
ignore_option_errors=ignore_option_errors)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 120, in parse_configuration
meta.parse()
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 425, in parse
section_parser_method(section_options)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 398, in parse_section
self[name] = value
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 183, in __setitem__
value = parser(value)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 516, in _parse_version
version = version()
File "/usr/lib/python3/dist-packages/setuptools_scm/__init__.py", line 144, in get_version
parsed_version = _do_parse(config)
File "/usr/lib/python3/dist-packages/setuptools_scm/__init__.py", line 95, in _do_parse
config, "setuptools_scm.parse_scm"
File "/usr/lib/python3/dist-packages/setuptools_scm/__init__.py", line 52, in _version_from_entrypoint
version = _call_entrypoint_fn(config, ep.load())
File "/usr/lib/python3/dist-packages/setuptools_scm/__init__.py", line 39, in _call_entrypoint_fn
return fn(config.absolute_root, config=config)
File "/usr/lib/python3/dist-packages/setuptools_scm/git.py", line 135, in parse
branch=branch,
File "/usr/lib/python3/dist-packages/setuptools_scm/version.py", line 204, in meta
assert parsed_version is not None, "cant parse version %s" % tag
AssertionError: cant parse version debian/1.9-4
E: pybuild pybuild:341: clean: plugin distutils failed with: exit code=1: python3.7 setup.py clean
dh_auto_clean: pybuild --clean -i python{version} -p 3.7 returned exit code 13
make[1]: *** [debian/rules:26: override_dh_auto_clean] Error 25
make[1]: Leaving directory '/home/becue/git/debian/python-team/applications/fava/fava'
make: *** [debian/rules:9: clean] Error 2
E: Failed to clean source directory /home/becue/git/debian/python-team/applications/fava/fava (/home/becue/git/debian/python-team/applications/fava/fava_1.10-1.dsc)
I wonder if upstream shouldn't make its version parsing regex a little
less constrained.
With best regards,
-- System Information:
Debian Release: 10.0
APT prefers stable
APT policy: (990, 'stable'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
More information about the Python-modules-team
mailing list