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

Unable to upgrade Lyrebird due to breaking change in setuptools #879

Open
KevinSJ opened this issue Nov 14, 2024 · 1 comment
Open

Unable to upgrade Lyrebird due to breaking change in setuptools #879

KevinSJ opened this issue Nov 14, 2024 · 1 comment

Comments

@KevinSJ
Copy link
Contributor

KevinSJ commented Nov 14, 2024

Description
I'm trying to upgrade Lyrebird but encounted the following error.

❯ pip3 install --upgrade lyrebird
Requirement already satisfied: lyrebird in /opt/homebrew/lib/python3.11/site-packages (3.0.5)
Collecting lyrebird
  Using cached lyrebird-3.1.0.tar.gz (5.5 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [53 lines of output]
      running egg_info
      creating /private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-pip-egg-info-2la01b81/lyrebird.egg-info
      writing /private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-pip-egg-info-2la01b81/lyrebird.egg-info/PKG-INFO
      writing dependency_links to /private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-pip-egg-info-2la01b81/lyrebird.egg-info/dependency_links.txt
      writing entry points to /private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-pip-egg-info-2la01b81/lyrebird.egg-info/entry_points.txt
      writing requirements to /private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-pip-egg-info-2la01b81/lyrebird.egg-info/requires.txt
      writing top-level names to /private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-pip-egg-info-2la01b81/lyrebird.egg-info/top_level.txt
      writing manifest file '/private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-pip-egg-info-2la01b81/lyrebird.egg-info/SOURCES.txt'
      reading manifest file '/private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-pip-egg-info-2la01b81/lyrebird.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found under directory '*'
      warning: no previously-included files matching '*.pyo' found under directory '*'
      warning: no previously-included files matching '*.swo' found under directory '*'
      warning: no previously-included files matching '*.swp' found under directory '*'
      warning: no previously-included files matching '*.map' found under directory '*'
      warning: no previously-included files matching '*.DS_Store' found under directory '*'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/hb/q1lz2z2d0_702xpxyp41jqc40000gn/T/pip-install-ukop0esl/lyrebird_905dd0595cdb41a9925c76d0cd0b7ae6/setup.py", line 22, in <module>
          setup(
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/dist.py", line 950, in run_command
          super().run_command(command)
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
          cmd_obj.run()
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 311, in run
          self.find_sources()
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 319, in find_sources
          mm.run()
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 545, in run
          self.prune_file_list()
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/command/sdist.py", line 161, in prune_file_list
          super().prune_file_list()
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 392, in prune_file_list
          base_dir = self.distribution.get_fullname()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_core_metadata.py", line 267, in get_fullname
          return _distribution_fullname(self.get_name(), self.get_version())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/homebrew/lib/python3.11/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
          canonicalize_version(version, strip_trailing_zero=False),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

To Reproduce
Steps to reproduce the behavior:

  1. Run pip install --upgrade lyrebird
  2. The command failed with the error above

Expected behavior
The command should succeed, and Lyrebird should be upgraded to latest version

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS 14.7.1
  • Python: 3.11
  • pip 24.3.1 from /opt/homebrew/lib/python3.11/site-packages/pip (python 3.11)

Additional context
A quick Googling links me to the issue here: pypa/setuptools#4483
So the root cause seems to be a breaking change in setuptools version 71.

The proposed solution is to either upgrade packing package or pin setuptools to version 70.

I'm not familar enough to understand which route is better, but happy to contribute and make the fix if required.

I think might be a good idea to add some tests, so this doesn't happen again?

@noO0oOo0ob
Copy link
Collaborator

Thanks for your issue, we plan to fix this issue in future python3.12 and python3.13 compatibility work

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

2 participants