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

Make it possible to build from tarball again #428

Closed
shibumi opened this issue Dec 7, 2019 · 4 comments
Closed

Make it possible to build from tarball again #428

shibumi opened this issue Dec 7, 2019 · 4 comments
Assignees
Labels
Accepted Accepted issue on our roadmap Bug Generic bug: can be used together with more specific labels Priority: medium Medium priority Regression Bug that breaks functionality known to work in previous releases Status: in progress Issue/pull request which is currently being worked on
Milestone

Comments

@shibumi
Copy link

shibumi commented Dec 7, 2019

Hi,
I think @ArchangeGabriel already came up with this bug:

Traceback (most recent call last):
  File "setup.py", line 3, in <module>
    setup(
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3.8/site-packages/setuptools/dist.py", line 446, in __init__
    _Distribution.__init__(self, {
  File "/usr/lib/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/usr/lib/python3.8/site-packages/setuptools/dist.py", line 735, in finalize_options
    ep.load()(self, ep.name, value)
  File "/build/whipper/src/whipper-0.9.0/.eggs/setuptools_scm-3.3.3-py3.8.egg/setuptools_scm/integration.py", line 17, in version_keyword
    dist.metadata.version = get_version(**value)
  File "/build/whipper/src/whipper-0.9.0/.eggs/setuptools_scm-3.3.3-py3.8.egg/setuptools_scm/__init__.py", line 150, in get_version
    parsed_version = _do_parse(config)
  File "/build/whipper/src/whipper-0.9.0/.eggs/setuptools_scm-3.3.3-py3.8.egg/setuptools_scm/__init__.py", line 105, in _do_parse
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for '/build/whipper/src/whipper-0.9.0'.

This can be fixed via cloning whipper from repository, I know.
But I would like to address this problem in this issue, because...

  1. It makes your tarball basically useless
  2. It undermines security, as a sha512 checksum for a tarball is much stronger than the usual used git hashes for commit or tags. (despite this, I still think you should sign your releases with a GPG key :) )
@shibumi
Copy link
Author

shibumi commented Dec 7, 2019

As far as I see a solution for this issue:

You could add a PKG-INFO file to your repository. That way distributions would be able to build it from the tarball again.

@shibumi
Copy link
Author

shibumi commented Dec 7, 2019

Hi I've found a way to mitigate this error:

echo "Version: 0.9.0" > PKG-INFO
Then everything works fine... but would be still cool if you could provide such a PKG-INFO file.

@JoeLametta
Copy link
Collaborator

JoeLametta commented Dec 12, 2019

This issue still needs to be addressed but in the meantime a (cleaner?) workaround (suggested by @mruszczyk) would be using the SETUPTOOLS_SCM_PRETEND_VERSION environment variable directly. More details HERE.

@jpalus You may be interested in this discussion.

Cheers,
Joe

@JoeLametta JoeLametta added Accepted Accepted issue on our roadmap Bug Generic bug: can be used together with more specific labels Priority: medium Medium priority Regression Bug that breaks functionality known to work in previous releases labels Dec 12, 2019
@JoeLametta JoeLametta added this to the 1.0 milestone Dec 12, 2019
pld-gitsync pushed a commit to pld-linux/whipper that referenced this issue Jan 25, 2020
- ported to python3
- workaround setuptools-scm madness with SETUPTOOLS_SCM_PRETEND_VERSION
  (see whipper-team/whipper#428)
- provides its own accuraterip-checksum implementation
@JoeLametta
Copy link
Collaborator

JoeLametta commented Sep 17, 2020

Hi I've found a way to mitigate this error:

echo "Version: 0.9.0" > PKG-INFO
Then everything works fine... but would be still cool if you could provide such a PKG-INFO file.

Maybe we could solve this issue providing such a file only in (future) tagged versions.

@JoeLametta JoeLametta added the Status: in progress Issue/pull request which is currently being worked on label Sep 18, 2020
@JoeLametta JoeLametta self-assigned this Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug Generic bug: can be used together with more specific labels Priority: medium Medium priority Regression Bug that breaks functionality known to work in previous releases Status: in progress Issue/pull request which is currently being worked on
Projects
None yet
Development

No branches or pull requests

2 participants