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

Support setuptools 18.0.0.1 #140

Closed
domenkozar opened this issue Aug 27, 2015 · 13 comments
Closed

Support setuptools 18.0.0.1 #140

domenkozar opened this issue Aug 27, 2015 · 13 comments

Comments

@domenkozar
Copy link

Traceback on install:

building path(s) ‘/nix/store/f06j9bflm7sylhcmsfi39mbr230lrypn-python2.7-python-fedora-0.5.5’
unpacking sources
unpacking source archive /nix/store/hpyfnh9qy72mf8svn6ig3h8iyy842x21-python-fedora-0.5.5.tar.gz
source root is python-fedora-0.5.5
patching sources
configuring
building
Traceback (most recent call last):
  File "setup.py", line 19, in <module>
    from setuptools import find_packages, setup
  File "/nix/store/fpjrbn8jr6nvfijz32vy147mpar7qc72-python2.7-setuptools-18.0.1/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/__init__.py", line 11, in <module>
    from setuptools.extension import Extension
  File "/nix/store/fpjrbn8jr6nvfijz32vy147mpar7qc72-python2.7-setuptools-18.0.1/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/extension.py", line 8, in <module>
    from .dist import _get_unpatched
  File "/nix/store/fpjrbn8jr6nvfijz32vy147mpar7qc72-python2.7-setuptools-18.0.1/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/dist.py", line 19, in <module>
    import pkg_resources
  File "/nix/store/fpjrbn8jr6nvfijz32vy147mpar7qc72-python2.7-setuptools-18.0.1/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/pkg_resources/__init__.py", line 90, in <module>
    packaging = pkg_resources._vendor.packaging
AttributeError: 'module' object has no attribute '_vendor'
builder for ‘/nix/store/c0ns8crsv0amkjnwav7lz33ry1srizkl-python2.7-python-fedora-0.5.5.drv’ failed with exit code 1
error: build of ‘/nix/store/c0ns8crsv0amkjnwav7lz33ry1srizkl-python2.7-python-fedora-0.5.5.drv’ failed
@pypingou
Copy link
Member

If I read the stacktrace properly it fails in the setup.py of python-fedora at the line:
from setuptools import find_packages, setup
All the rest is in setuptools, so isn't the bug in setuptools rather than in python-fedora then?

@domenkozar
Copy link
Author

You're most probably right, we're missing _vendor module.

@domenkozar
Copy link
Author

If I remove setuptools has at the top of setup.py https://github.com/fedora-infra/python-fedora/blob/develop/setup.py#L5 installation works.

@pypingou
Copy link
Member

The bug is still in setuptools, of course if you do not call setuptools then the problem is fixed but all we do is an import so it should work.

@domenkozar
Copy link
Author

No, you fiddle with __requires__

@pypingou
Copy link
Member

And that's not allowed? Many projects are using this to be able to distinguish which version of a library to import when multiple are installed.

@ralphbean
Copy link
Contributor

Is there a bug filed on setuptools to track this behavior? It's true, lots of older multi-version compat packages use __requires__ to juggle versions at import time.

@domenkozar
Copy link
Author

@pypingou
Copy link
Member

pypingou commented Aug 27, 2015 via email

@domenkozar
Copy link
Author

Can you elaborate why you're using __requires__?

@domenkozar
Copy link
Author

You should be easily able to specify those dependencies in install_requires

@pypingou
Copy link
Member

When you have two versions of a library installed on one system (in this case cherrypy above and below version 3), using __requires__ allows to enforce importing the right version (ie: importing version < 3 on py2 while we don't care on py3), similarly for sphinx, you can have multiple version of sphinx installed, but we need that import sphinx imports the version that's >= 1.0

@domenkozar
Copy link
Author

multi version installations aren't supported by setuptools afaik.

ralphbean added a commit that referenced this issue Oct 9, 2015
Fixes #140.

These are both no longer necessary. That version of cherrypy and that
version of sphinx are both available, by default, on all branches of
Fedora/EPEL that we support.
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

3 participants