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

Latest Defopt installation raises AttributeError: 'Version' object has no attribute 'release' #88

Closed
Ben-Habermeyer opened this issue Aug 27, 2021 · 2 comments

Comments

@Ben-Habermeyer
Copy link

Ben-Habermeyer commented Aug 27, 2021

When installing latest defopt 6.1.0 (and any version 6.*) we have started to see

Collecting defopt (from -r requirements.txt (line 4))
  Downloading https://pypi.counsyl.com/root/pypi/%2Bf/cfe/6ecfb54b1368a/defopt-6.1.0.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-q7m_amiq/defopt/setup.py", line 50, in <module>
        keywords='argument parser parsing optparse argparse getopt docopt sphinx',
      File "/var/lib/go-agent/pipelines/make-ci-10/code/env/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/var/lib/go-agent/pipelines/make-ci-10/code/env/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/var/lib/go-agent/pipelines/make-ci-10/code/env/lib/python3.6/site-packages/setuptools/dist.py", line 444, in __init__
        k: v for k, v in attrs.items()
      File "/var/lib/go-agent/pipelines/make-ci-10/code/env/lib/python3.6/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/var/lib/go-agent/pipelines/make-ci-10/code/env/lib/python3.6/site-packages/setuptools/dist.py", line 732, in finalize_options
        ep.load()(self, ep.name, value)
      File "/tmp/pip-install-q7m_amiq/defopt/.eggs/setuptools_scm-6.1.0-py3.6.egg/setuptools_scm/integration.py", line 26, in version_keyword
        dist.metadata.version = _get_version(config)
      File "/tmp/pip-install-q7m_amiq/defopt/.eggs/setuptools_scm-6.1.0-py3.6.egg/setuptools_scm/__init__.py", line 192, in _get_version
        template=config.write_to_template,
      File "/tmp/pip-install-q7m_amiq/defopt/.eggs/setuptools_scm-6.1.0-py3.6.egg/setuptools_scm/__init__.py", line 94, in dump_version
        version_fields = parsed_version.release
    AttributeError: 'Version' object has no attribute 'release'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-q7m_amiq/defopt/

The installation command is pip install --no-deps -r .requirements.txt with latest defopt in this requirements file.

Pinning version to lower 5.1.0 resolves this issue, but unfortunately we would like to use latest features.

@anntzer
Copy link
Owner

anntzer commented Aug 28, 2021

This is due to likely due to pypa/setuptools_scm#605 / pypa/setuptools_scm#612 and should be fixed on their side.

@anntzer anntzer closed this as completed Aug 28, 2021
@Ben-Habermeyer
Copy link
Author

thanks for narrowing this down @anntzer !

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