byuccl / spydrnet

A flexible framework for analyzing and transforming FPGA netlists. Official repository.
https://byuccl.github.io/spydrnet
BSD 3-Clause "New" or "Revised" License
86 stars 20 forks source link

`setuptools.extern.packaging.version.InvalidVersion` on `next_release` branch #218

Closed jgoeders closed 8 months ago

jgoeders commented 8 months ago

I'm trying to test the next_release branch by targeting it like so in my requirements.txt (see here):

spydrnet @ git+https://github.com/byuccl/spydrnet@next_release

However, this results in an invalid version string:

setuptools.extern.packaging.version.InvalidVersion: Invalid version: '1.13.0-16-g2bf4441'

Here is the full output if it helps:

Collecting spydrnet@ git+https://github.com/byuccl/spydrnet@next_release (from -r requirements.txt (line 15))
  Cloning https://github.com/byuccl/spydrnet (to revision next_release) to /tmp/pip-install-7dcuh81q/spydrnet_6754032ac25043fe90d785879ee27868
  Running command git clone --filter=blob:none --quiet https://github.com/byuccl/spydrnet /tmp/pip-install-7dcuh81q/spydrnet_6754032ac25043fe90d785879ee27868
  Running command git checkout -b next_release --track origin/next_release
  Switched to a new branch 'next_release'
  Branch 'next_release' set up to track remote branch 'next_release' from 'origin'.
  Resolved https://github.com/byuccl/spydrnet to commit 2bf4441f55108743dd659593a07f7445a98fcc1a
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [70 lines of output]
      /tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/dist.py:315: SetuptoolsDeprecationWarning: Invalid version: '1.13.0-16-g2bf4441'.
      !!

              ********************************************************************************
              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.

              This deprecation is overdue, please update your project and remove deprecated
              calls to avoid build errors in the future.

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

      !!
        self._validate_version(self.metadata.version)
      running egg_info
      /tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py:130: SetuptoolsDeprecationWarning: Invalid version: '1.13.0-16-g2bf4441'.
      !!

              ********************************************************************************
              Version '1.13.0-16-g2bf4441' 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.

              This deprecation is overdue, please update your project and remove deprecated
              calls to avoid build errors in the future.

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

      !!
        return _normalization.best_effort_version(tagged)
      Traceback (most recent call last):
        File "/home/jgoeders/bfasst/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/jgoeders/bfasst/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/jgoeders/bfasst/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 44, in <module>
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.ensure_finalized()
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 224, in finalize_options
          parsed_version = packaging.version.Version(self.egg_version)
        File "/tmp/pip-build-env-niugv5sy/overlay/lib/python3.10/site-packages/setuptools/_vendor/packaging/version.py", line 198, in __init__
          raise InvalidVersion(f"Invalid version: '{version}'")
      setuptools.extern.packaging.version.InvalidVersion: Invalid version: '1.13.0-16-g2bf4441'
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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