Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1318263 - Cannot import pygit2 (IOError, PermissionError)
Summary: Cannot import pygit2 (IOError, PermissionError)
Keywords:
Status: CLOSED DUPLICATE of bug 1311161
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pygit2
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pete Walter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-16 11:42 UTC by Miro Hrončok
Modified: 2016-03-20 14:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-20 14:24:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2016-03-16 11:42:27 UTC
Description of problem:
pygit2 is not importable on F23

Version-Release number of selected component (if applicable):
python-pygit2-0.23.0-0.1.fc23.x86_64
python3-pygit2-0.23.0-0.1.fc23.x86_64


How reproducible:
On freshly installed F23 as well as on an updated one form F20 -> F21 -> F22 -> F23

Steps to Reproduce:
0. install python{,3}-pygit2
1. run python or python3
2. import pygit2
3. observe

Actual results:
>>> import pygit2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/pygit2/__init__.py", line 35, in <module>
    from .blame import Blame, BlameHunk
  File "/usr/lib64/python2.7/site-packages/pygit2/blame.py", line 32, in <module>
    from .errors import check_error
  File "/usr/lib64/python2.7/site-packages/pygit2/errors.py", line 29, in <module>
    from .ffi import ffi, C
  File "/usr/lib64/python2.7/site-packages/pygit2/ffi.py", line 35, in <module>
    ffi, C = get_ffi()
  File "/usr/lib64/python2.7/site-packages/pygit2/_utils.py", line 107, in get_ffi
    include_dirs=[libgit2_include], library_dirs=[libgit2_lib])
  File "/usr/lib64/python2.7/site-packages/cffi/api.py", line 424, in verify
    lib = self.verifier.load_library()
  File "/usr/lib64/python2.7/site-packages/cffi/verifier.py", line 109, in load_library
    self._write_source()
  File "/usr/lib64/python2.7/site-packages/cffi/verifier.py", line 198, in _write_source
    with open(self.sourcefilename, "w") as fp:
IOError: [Errno 2] No such file or directory: '/usr/lib64/python2.7/site-packages/pygit2/__pycache__/pygit2_cffi_256143ebxe8494016.c'


>>> import pygit2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.4/site-packages/pygit2/__init__.py", line 35, in <module>
    from .blame import Blame, BlameHunk
  File "/usr/lib64/python3.4/site-packages/pygit2/blame.py", line 32, in <module>
    from .errors import check_error
  File "/usr/lib64/python3.4/site-packages/pygit2/errors.py", line 29, in <module>
    from .ffi import ffi, C
  File "/usr/lib64/python3.4/site-packages/pygit2/ffi.py", line 35, in <module>
    ffi, C = get_ffi()
  File "/usr/lib64/python3.4/site-packages/pygit2/_utils.py", line 107, in get_ffi
    include_dirs=[libgit2_include], library_dirs=[libgit2_lib])
  File "/usr/lib64/python3.4/site-packages/cffi/api.py", line 424, in verify
    lib = self.verifier.load_library()
  File "/usr/lib64/python3.4/site-packages/cffi/verifier.py", line 109, in load_library
    self._write_source()
  File "/usr/lib64/python3.4/site-packages/cffi/verifier.py", line 198, in _write_source
    with open(self.sourcefilename, "w") as fp:
PermissionError: [Errno 13] Permission denied: '/usr/lib64/python3.4/site-packages/pygit2/__pycache__/pygit2_cffi_6bc76ceexe8494016.c'

Expected results:
Should import and work as expected.

Additional info:
I was running pygit2 from repository of https://copr.fedorainfracloud.org/coprs/bochecha/ on F20 and it worked. Than I updated to F23, teh rpo is gone, I'm using pygit2 from Fedora and it is broken. I've tried on other machine with the same result.

Comment 1 Igor Gnatenko 2016-03-20 10:23:23 UTC
works here with: python3-pygit2-0.23.3-2.fc25.x86_64

Comment 2 Igor Gnatenko 2016-03-20 14:24:51 UTC

*** This bug has been marked as a duplicate of bug 1311161 ***


Note You need to log in before you can comment on or make changes to this bug.