Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

versionning scheme incompatible with setuptools 66 #98

Open
emollier opened this issue Feb 6, 2023 · 0 comments
Open

versionning scheme incompatible with setuptools 66 #98

emollier opened this issue Feb 6, 2023 · 0 comments

Comments

@emollier
Copy link

emollier commented Feb 6, 2023

Greetings,

For information, Lucas Nussbaum reported in Debian bug #1030467 that pangoLEARN fails to build with the following error:

Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/setup.py", line 9, in <module>
    setup(name='pangoLEARN',
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 108, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/build.py", line 132, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", line 63, in run
    self.build_package_data()
  File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", line 159, in build_package_data
    for target, srcfile in self._get_package_data_output_mapping():
  File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", line 151, in _get_package_data_output_mapping
    for package, src_dir, build_dir, filenames in self.data_files:
                                                  ^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", line 72, in __getattr__
    self.data_files = self._get_data_files()
                      ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", line 84, in _get_data_files
    self.analyze_manifest()
  File "/usr/lib/python3/dist-packages/setuptools/command/build_py.py", line 181, in analyze_manifest
    self.run_command('egg_info')
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1213, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 219, in finalize_options
    parsed_version = parse_version(self.egg_version)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 266, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '2022-07-09'

This looks to be caused by the introduction of setuptools ≥ 66 in the upcoming Debian 12 bookworm. Since this version, the PEP 440 compliance is enforced by this modules installer. I'm considering adjusting the version number of pangoLEARN with the following change in order to restore the package in working conditions with setuptools 66 in Debian 12:

--- python-pangolearn.orig/pangoLEARN/__init__.py
+++ python-pangolearn/pangoLEARN/__init__.py
@@ -1,5 +1,5 @@
 _program = "pangoLEARN"
-__version__ = "2022-07-09"
+__version__ = "2022.07.09"
 PANGO_VERSION = "v1.12"
 
 __all__ = ["training"]

I know it's not very compliant with the ISO/RFC 3339 representation of dates, but it solves the problem on my end. 2022.07.09 also sorts greater than 2022-07-09 by sort -V and dpkg --compare-versions, so this should make the transission not too painful.

In hope this helps,
Étienne.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant