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

editable installation fails with latest setuptools #1545

Closed
nelson-liu opened this issue Jun 7, 2023 · 1 comment
Closed

editable installation fails with latest setuptools #1545

nelson-liu opened this issue Jun 7, 2023 · 1 comment

Comments

@nelson-liu
Copy link

When trying to set up an editable installation with setuptools==67.8.0, I get the error below. Just thought I'd raise an issue in case you'd like to change how version identifiers are formatted in a future release. Thanks!

$ pip install -e .
Obtaining file:///home/nfliu/git/pyserini
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [59 lines of output]
      /home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/dist.py:520: SetuptoolsDeprecationWarning: Invalid version: '0.21.1-2cr-test'.
      !!

              ********************************************************************************
              The version specified is not a valid version according to PEP 440.
              This may not work as expected with newer versions of
              setuptools, pip, and PyPI.

              By 2023-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://peps.python.org/pep-0440/ for details.
              ********************************************************************************

      !!
        self._validate_version(self.metadata.version)
      running egg_info
      /home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/command/egg_info.py:131: SetuptoolsDeprecationWarning: Invalid version: '0.21.1-2cr-test'.
      !!

              ********************************************************************************
              Version '0.21.1-2cr-test' is not valid according to PEP 440.

              Please make sure to specify a valid version for your package.
              Also note that future releases of setuptools may halt the build process
              if an invalid version is given.

              By 2023-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://peps.python.org/pep-0440/ for details.
              ********************************************************************************

      !!
        return _normalization.best_effort_version(tagged)
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/nfliu/git/pyserini/setup.py", line 14, in <module>
          setuptools.setup(
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
          super().run_command(command)
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.ensure_finalized()
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options
          parsed_version = packaging.version.Version(self.egg_version)
        File "/home/nfliu/miniconda3/envs/pyserini/lib/python3.10/site-packages/setuptools/_vendor/packaging/version.py", line 197, in __init__
          raise InvalidVersion(f"Invalid version: '{version}'")
      setuptools.extern.packaging.version.InvalidVersion: Invalid version: '0.21.1-2cr-test'
      [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.
@lintool
Copy link
Member

lintool commented Jun 7, 2023

Thanks for noting. I forgot to revert some things I was testing on Test PyPI.
Fixed via #1546

lintool added a commit that referenced this issue Jun 7, 2023
Ref: #1538 - I was experimenting with PyPI test and committed a mangled version id; identified by #1545
Reverting.
@lintool lintool closed this as completed Mar 26, 2024
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