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

setup doesn't complete all necessary compiling #15

Closed
tisdall opened this issue Oct 2, 2014 · 3 comments
Closed

setup doesn't complete all necessary compiling #15

tisdall opened this issue Oct 2, 2014 · 3 comments

Comments

@tisdall
Copy link

tisdall commented Oct 2, 2014

Here's the stacktrace:

Traceback (most recent call last):
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 271, in loadobj
    global_conf=global_conf)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 320, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 454, in get_context
    section)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 476, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 406, in get_context
    global_conf=global_conf)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 296, in loadcontext
    global_conf=global_conf)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 328, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 620, in get_context
    object_type, name=name)
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
    possible.append((entry.load(), protocol, entry.name))
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/pkg_resources.py", line 2147, in load
    ['__name__'])
  File "/sites/metrics_dev/mainserver/__init__.py", line 17, in <module>
    from .security import (
  File "/sites/metrics_dev/mainserver/security.py", line 21, in <module>
    from .models import (
  File "/sites/metrics_dev/mainserver/models.py", line 3, in <module>
    import bcrypt
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/bcrypt-1.0.2-py3.4.egg/bcrypt/__init__.py", line 71, in <module>
    ).hexdigest()[:6],
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/cffi/api.py", line 341, in verify
    lib = self.verifier.load_library()
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/cffi/verifier.py", line 73, in load_library
    self._write_source()
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/cffi/verifier.py", line 125, in _write_source
    file = open(self.sourcefilename, 'w')
PermissionError: [Errno 13] Permission denied: '/sites/metrics_dev/env/lib/python3.4/site-packages/bcrypt-1.0.2-py3.4.egg/bcrypt/__pycache__/_cffi_677459_d17cc0.c'

Basically, I install Cython, cffi, and bcrypt (as well as other packages) as root. Then I run my project as www-data. The first time I run it I get the previous stack trace because it tries to generate a .c file in a directory with only permissions for root.

I didn't seem to have this problem with Cython==0.20.1 and cffi==0.8.2 but I do with the latest with is Cython==0.21 and cffi==0.8.6 . My version of bcrypt is unchanged between the two so if it's an issue with bcrypt it's that it needs to accommodate some change in cffi.

Please let me know if you think this is an issue better reported to cffi.

@tisdall
Copy link
Author

tisdall commented Oct 2, 2014

oh.. I worked around the issue by running python as root and doing import bcrypt to cause it to compile the file as root. www-data has no issues reading the file after that.

@tisdall
Copy link
Author

tisdall commented Oct 2, 2014

Ah.. this seems to be related to #5 . Same permission issue.

@tisdall tisdall changed the title setup doesn't complete compiling setup doesn't complete all necessary compiling Oct 2, 2014
@alex
Copy link
Member

alex commented Dec 6, 2014

This should be fixed on master now. We'll do a new release shortly.

@alex alex closed this as completed Dec 6, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants