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

2.3.0 Build problem with setuptools-scm #52

Closed
Vascom opened this issue May 15, 2018 · 7 comments
Closed

2.3.0 Build problem with setuptools-scm #52

Vascom opened this issue May 15, 2018 · 7 comments

Comments

@Vascom
Copy link

Vascom commented May 15, 2018

I have problem build v2.3.0 for fedora
As I see it requires setuptools-scm now. And if is absent I have error

/usr/bin/python2 setup.py build '--executable=/usr/bin/python2 -s'
Download error on https://pypi.python.org/simple/setuptools_scm/: [Errno -2] Name or service not known -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for setuptools_scm

https://kojipkgs.fedoraproject.org//work/tasks/3379/26973379/build.log

But if present I have another error:

/usr/bin/python2 setup.py build '--executable=/usr/bin/python2 -s'
Traceback (most recent call last):
  File "setup.py", line 35, in <module>
    "License :: OSI Approved :: MIT License",
  File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 372, in __init__
    _Distribution.__init__(self, attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 528, in finalize_options
    ep.load()(self, ep.name, value)
  File "/usr/lib/python2.7/site-packages/setuptools_scm/integration.py", line 22, in version_keyword
    dist.metadata.version = get_version(**value)
  File "/usr/lib/python2.7/site-packages/setuptools_scm/__init__.py", line 119, in get_version
    parsed_version = _do_parse(root, parse)
  File "/usr/lib/python2.7/site-packages/setuptools_scm/__init__.py", line 97, in _do_parse
    "use git+https://github.com/user/proj.git#egg=proj" % root)
LookupError: setuptools-scm was unable to detect version for '/builddir/build/BUILD/pymediainfo-2.3.0'.
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

https://kojipkgs.fedoraproject.org//work/tasks/3511/26973511/build.log

Build server don't have access to internet. I use tarball from github.

How can I solve this problem?

@sbraz
Copy link
Owner

sbraz commented May 15, 2018

Please try with the PyPI tarball, GitHub releases are autogenerated and should not be used.

@Vascom
Copy link
Author

Vascom commented May 15, 2018

Can you show me URL to this tarballs?

@sbraz
Copy link
Owner

sbraz commented May 15, 2018

The error is quite explicit too :)

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.

@sbraz
Copy link
Owner

sbraz commented May 15, 2018

@Vascom
Copy link
Author

Vascom commented May 15, 2018

Thanks.

Also it require setuptools-scm > 2 or can work with 1.15.7?
I see this if use 1.15.7:

your setuptools is too old (<12)
setuptools_scm functionality is degraded

@sbraz
Copy link
Owner

sbraz commented May 15, 2018

If the package's __version__ is 2.3.0 once it's installed, then I guess it works :)
I only use setuptools_scm so that I don't have to specify the package version twice (tag a commit and edit a file).
Also, setuptools_scm is just used during build/install, it's not required at runtime.

@Vascom
Copy link
Author

Vascom commented May 15, 2018

OK.

@Vascom Vascom closed this as completed May 15, 2018
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