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

tox crashes due to pbr error "Versioning for this project requires either an sdist tarball, or ..." #16

Open
liborjelinek opened this issue Oct 19, 2021 · 0 comments

Comments

@liborjelinek
Copy link

tox command in just created new project based on this template crashes with pbr this exception:

Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name sphinxcontrib-foo was given, but was not able to be found.
error in setup command: Error parsing /Users/matt/tmp/sphinxcontrib-test/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name sphinxcontrib-foo was given, but was not able to be found.

I didn't do anything except creation of sphinxcontrib-foo:

$ cookiecutter https://github.com/sphinx-contrib/cookiecutter.git

github_org [sphinx-contrib]: 
package_name [The name of the extension package]: foo
project_name [sphinxcontrib-foo]: 
short_description [A short description of the extension]: foo description
author_name [Your name]: foo author
author_email [Your email]: foo email

and executing tox:

$ tox
GLOB sdist-make: /Users/matt/tmp/sphinxcontrib-test/setup.py
ERROR: invocation failed (exit code 1), logfile: /Users/matt/tmp/sphinxcontrib-test/.tox/log/GLOB-0.log
================================================== log start ===================================================
ERROR:root:Error parsing
Traceback (most recent call last):
  File "/Users/matt/tmp/sphinxcontrib-test/.eggs/pbr-5.6.0-py3.8.egg/pbr/core.py", line 96, in pbr
    attrs = util.cfg_to_args(path, dist.script_args)
  File "/Users/matt/tmp/sphinxcontrib-test/.eggs/pbr-5.6.0-py3.8.egg/pbr/util.py", line 274, in cfg_to_args
    pbr.hooks.setup_hook(config)
  File "/Users/matt/tmp/sphinxcontrib-test/.eggs/pbr-5.6.0-py3.8.egg/pbr/hooks/__init__.py", line 25, in setup_hook
    metadata_config.run()
  File "/Users/matt/tmp/sphinxcontrib-test/.eggs/pbr-5.6.0-py3.8.egg/pbr/hooks/base.py", line 27, in run
    self.hook()
  File "/Users/matt/tmp/sphinxcontrib-test/.eggs/pbr-5.6.0-py3.8.egg/pbr/hooks/metadata.py", line 25, in hook
    self.config['version'] = packaging.get_version(
  File "/Users/matt/tmp/sphinxcontrib-test/.eggs/pbr-5.6.0-py3.8.egg/pbr/packaging.py", line 874, in get_version
    raise Exception("Versioning for this project requires either an sdist"
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name sphinxcontrib-foo was given, but was not able to be found.
error in setup command: Error parsing /Users/matt/tmp/sphinxcontrib-test/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name sphinxcontrib-foo was given, but was not able to be found.

=================================================== log end ====================================================
ERROR: FAIL could not package project - v = InvocationError('/Users/matt/tmp/sphinxcontrib-test/venv/bin/python3 setup.py sdist --formats=zip --dist-dir /Users/matt/tmp/sphinxcontrib-test/.tox/dist', 1)

Is there any pbr guru that could help to fix it?

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

1 participant