ai4os / DEEPaaS

A REST API to serve machine learning and deep learning models
https://deepaas.readthedocs.io
Apache License 2.0
34 stars 14 forks source link

Manual install fails: `pbr.version.SemanticVersion` #153

Closed IgnacioHeredia closed 3 weeks ago

IgnacioHeredia commented 2 months ago

Manual installation is failing. Installation from PyPi works though.

❯ pip install -e .   
Obtaining file:///home/iheredia/ignacio/projects/deephdc/deepaas
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      ERROR:root:Error parsing
      Traceback (most recent call last):
        File "/home/iheredia/anaconda3/lib/python3.8/site-packages/pbr/core.py", line 105, in pbr
          attrs = util.cfg_to_args(path, dist.script_args)
        File "/home/iheredia/anaconda3/lib/python3.8/site-packages/pbr/util.py", line 272, in cfg_to_args
          pbr.hooks.setup_hook(config)
        File "/home/iheredia/anaconda3/lib/python3.8/site-packages/pbr/hooks/__init__.py", line 25, in setup_hook
          metadata_config.run()
        File "/home/iheredia/anaconda3/lib/python3.8/site-packages/pbr/hooks/base.py", line 27, in run
          self.hook()
        File "/home/iheredia/anaconda3/lib/python3.8/site-packages/pbr/hooks/metadata.py", line 25, in hook
          self.config['version'] = packaging.get_version(
        File "/home/iheredia/anaconda3/lib/python3.8/site-packages/pbr/packaging.py", line 857, in get_version
          version = _get_version_from_git(pre_version)
        File "/home/iheredia/anaconda3/lib/python3.8/site-packages/pbr/packaging.py", line 800, in _get_version_from_git
          result = _get_version_from_git_target(git_dir, target_version)
        File "/home/iheredia/anaconda3/lib/python3.8/site-packages/pbr/packaging.py", line 759, in _get_version_from_git_target
          raise ValueError(
      ValueError: git history requires a target version of pbr.version.SemanticVersion(2.3.2), but target version is pbr.version.SemanticVersion(2.0.0)
      error in setup command: Error parsing /home/iheredia/ignacio/projects/deephdc/deepaas/setup.cfg: ValueError: git history requires a target version of pbr.version.SemanticVersion(2.3.2), but target version is pbr.version.SemanticVersion(2.0.0)
      [end of output]

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

It looks there is a mismatch in versions (ref, ref), due to Release Please not GPG signing the tags (issue).

Temporary fix: revert to last signed tag and install from there:

git checkout tags/2.2.0
pip install -e .
git checkout master
IgnacioHeredia commented 1 month ago

Maybe when can modify the release please script to sign the releases with a "disposable" private key (ie. create key pair for an ai4os-bot).