You are not logged in.

#1 2015-03-05 13:40:52

Tucky
Member
Registered: 2012-10-24
Posts: 10

Toubles with pygit2 and cffi [Resolved]

Hi,

with python2-cffi 0.9, I cannot import pygit2, while with version 0.8.6, I had no troubles:

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

Installation via pip in a virtualenv works.

Would it be a package related issue ?

Last edited by Tucky (2015-03-26 08:19:05)

Offline

#2 2015-03-11 16:22:31

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Toubles with pygit2 and cffi [Resolved]

Try rebuilding python2-pygit2 using abs, if it works, file a bug report.

Last edited by Mr.Elendig (2015-03-11 16:24:07)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2015-03-12 18:45:43

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Toubles with pygit2 and cffi [Resolved]

I can confirm that importing pygit2 in python2 leads to the traceback poster by @Tucky.
However pygit2 seems to work well when I compiled it using ABS so I opened a bug report: FS#44165


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#4 2015-03-14 21:09:40

Tucky
Member
Registered: 2012-10-24
Posts: 10

Re: Toubles with pygit2 and cffi [Resolved]

Rebuilding using abs solves the problem. Until the bug report is not closed, I leave this tread as non-resolved.

[EDIT]: the new package version (0.22.0-2) solves the problem.

Last edited by Tucky (2015-03-26 08:18:32)

Offline

Board footer

Powered by FluxBB