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

declare package data in a way that is compatible with wheel packages #626

Merged
merged 1 commit into from
Dec 12, 2016

Conversation

eroldan
Copy link
Contributor

@eroldan eroldan commented Aug 11, 2016

This patch fixes package data not being found when installed from wheels. The "package_data" declaration seems to be the most current compatible way in the confusing distutils/setuptools world.

Example error:

[root@node-1 wheelize]$ ./edo/bin/gateone --version
Traceback (most recent call last):
  File "./edo/bin/gateone", line 7, in <module>
    from gateone.core.server import main
  File "/root/wheelize/edo/lib/python2.7/site-packages/gateone/core/server.py", line 398, in <module>
    from gateone.auth.authentication import NullAuthHandler, KerberosAuthHandler
  File "/root/wheelize/edo/lib/python2.7/site-packages/gateone/auth/authentication.py", line 86, in <module>
    from gateone.core.locale import get_translation
  File "/root/wheelize/edo/lib/python2.7/site-packages/gateone/core/locale.py", line 25, in <module>
    a for a in resource_listdir('gateone', 'i18n')
  File "/root/wheelize/edo/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1196, in resource_listdir
    resource_name
  File "/root/wheelize/edo/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1487, in resource_listdir
    return self._listdir(self._fn(self.module_path, resource_name))
  File "/root/wheelize/edo/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1575, in _listdir
    return os.listdir(path)
OSError: [Errno 2] No such file or directory: '/root/wheelize/edo/lib/python2.7/site-packages/gateone/i18n'


[root@node-1 wheelize]$ ./edo/bin/pip list
backports-abc (0.4)
backports.ssl-match-hostname (3.5.0.1)
certifi (2016.8.8)
futures (3.0.5)
gateone (1.2.0)
html5lib (0.999999999)
pip (8.1.2)
setuptools (25.1.6)
singledispatch (3.4.0.3)
six (1.10.0)
tornado (4.4.1)
webencodings (0.5)
wheel (0.29.0)

@liftoff liftoff merged commit 8e16ee7 into liftoff:master Dec 12, 2016
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