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

Use git to get whipper's version #370

Merged
merged 1 commit into from
Feb 15, 2019
Merged

Conversation

Freso
Copy link
Member

@Freso Freso commented Feb 14, 2019

This essentially a copy of code from spotify2musicbrainz: https://gitlab.com/Freso/spotify2musicbrainz/commit/59157165c4ca4e7bb1d5d8b081365029ddf55c72

Given that that code is in GPLv3 (and I'm its author :)), it should be fine to use. It is mostly boilerplate from upstream documentation anyway: https://pypi.org/project/setuptools-scm/

Should fix #337

@Freso Freso force-pushed the task/issue-337-use-scm-version branch 5 times, most recently from 7082b3f to 4bb3827 Compare February 14, 2019 10:51
This essentially a copy of code from spotify2musicbrainz:
https://gitlab.com/Freso/spotify2musicbrainz/commit/59157165c4ca4e7bb1d5d8b081365029ddf55c72

Given that that code is in GPLv3 (and I'm its author :)), it should be
fine to use. It is mostly boilerplate from upstream documentation
anyway: https://pypi.org/project/setuptools-scm/

Should fix #337

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
@Freso Freso force-pushed the task/issue-337-use-scm-version branch from 4bb3827 to af748c5 Compare February 14, 2019 10:55
@JoeLametta
Copy link
Collaborator

@Freso What happens if you download whipper's sources without using git? (like this)

@Freso
Copy link
Member Author

Freso commented Feb 14, 2019

(venv) (venv) freso@koume ~/t/w/whipper-task-issue-337-use-scm-version> python setup.py install --optimize=1
Traceback (most recent call last):
  File "setup.py", line 19, in <module>
    ('share/metainfo', ['com.github.whipper_team.Whipper.metainfo.xml']),
  File "/tmp/freso-tmp/whipper/venv/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/tmp/freso-tmp/whipper/venv/lib/python2.7/site-packages/setuptools/dist.py", line 447, in __init__
    k: v for k, v in attrs.items()
  File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/tmp/freso-tmp/whipper/venv/lib/python2.7/site-packages/setuptools/dist.py", line 739, in finalize_options
    ep.load()(self, ep.name, value)
  File "/tmp/freso-tmp/whipper/venv/lib/python2.7/site-packages/setuptools_scm/integration.py", line 23, in version_keyword
    dist.metadata.version = get_version(**value)
  File "/tmp/freso-tmp/whipper/venv/lib/python2.7/site-packages/setuptools_scm/__init__.py", line 144, in get_version
    parsed_version = _do_parse(config)
  File "/tmp/freso-tmp/whipper/venv/lib/python2.7/site-packages/setuptools_scm/__init__.py", line 111, in _do_parse
    "use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root
LookupError: setuptools-scm was unable to detect version for '/tmp/freso-tmp/whipper/whipper-task-issue-337-use-scm-version'.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

@JoeLametta JoeLametta merged commit d066c70 into develop Feb 15, 2019
@JoeLametta JoeLametta deleted the task/issue-337-use-scm-version branch February 15, 2019 17:32
@JoeLametta
Copy link
Collaborator

Merged, thanks!

JoeLametta added a commit that referenced this pull request Apr 2, 2019
Building or running whipper uninstalled requires setuptools-scm (since #370): which depends on git (or mercurial) in order to to its job.

Fixes #386.
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

Successfully merging this pull request may close these issues.

2 participants