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

Current version 0.8.1-snapshot is not valid according to PEP 440 and causes installation problems #862

Open
johann-petrak opened this issue May 30, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@johann-petrak
Copy link
Contributor

Not sure why I did not see this before but when I try to do something like pip install -e . from a freshly cloned version, I get these error messages:

  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [74 lines of output]
      running egg_info
      /home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/dist.py:755: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!
      
              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.
      
              By 2023-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        opt = self.warn_dash_deprecation(opt, section)
      /home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/dist.py:520: SetuptoolsDeprecationWarning: Invalid version: '0.8.1-snapshot'.
      !!
      
              ********************************************************************************
              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)
      /home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/command/egg_info.py:131: SetuptoolsDeprecationWarning: Invalid version: '0.8.1-snapshot'.
      !!
      
              ********************************************************************************
              Version '0.8.1-snapshot' 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 "/disk10t1/data/johann/tmp/farm-tools/FARM/setup.py", line 65, in <module>
          setup(
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
          super().run_command(command)
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.ensure_finalized()
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options
          parsed_version = packaging.version.Version(self.egg_version)
        File "/home/johann/software/anaconda/envs/farm-tools/lib/python3.8/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.8.1-snapshot'
      [end of output]
  
@johann-petrak johann-petrak added the bug Something isn't working label May 30, 2023
@stale
Copy link

stale bot commented Oct 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 21 days if no further activity occurs.

@stale stale bot added the stale label Oct 15, 2023
@minuenergy
Copy link

same problem.
did you fix this??

@stale stale bot removed the stale label Jun 17, 2024
@johann-petrak
Copy link
Contributor Author

This specific problem is easy to fix locally, just edit ./farm/_version.py and replace "0.8.1-snapshot" with something that conforms to the Python version number scheme, e.g. "0.8.1.dev1"

However there other problems of this repo due to bit-rot and missing maintenance, e.g. with which package version the installation process wants to pull. To get it to run you may also need to update requirements.txt before doing the installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants