Fix building 0.23.3 and re-enable the tests...

This commit is contained in:
Pierre-Yves Chibon 2016-02-07 22:22:29 +01:00
parent 55d2df63b1
commit d37c4d2dbd
2 changed files with 33 additions and 13 deletions

View File

@ -0,0 +1,27 @@
From d555dd66d4a35409b4d624e52562af44aa97e934 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= <cmn@dwim.me>
Date: Wed, 24 Feb 2016 14:49:32 +0100
Subject: [PATCH] Attempt to fix build on 0.23.3
---
pygit2/repository.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pygit2/repository.py b/pygit2/repository.py
index f8a6cad..1713828 100644
--- a/pygit2/repository.py
+++ b/pygit2/repository.py
@@ -716,8 +716,10 @@ class Repository(_Repository):
format_options.abbreviated_size = abbreviated_size
if always_use_long_format is not None:
format_options.always_use_long_format = always_use_long_format
+ dirty_ptr = None
if dirty_suffix:
- format_options.dirty_suffix = ffi.new('char[]', to_bytes(dirty_suffix))
+ dirty_ptr = ffi.new('char[]', to_bytes(dirty_suffix))
+ format_options.dirty_suffix = dirty_ptr
buf = ffi.new('git_buf *', (ffi.NULL, 0))
--
2.5.0

View File

@ -14,6 +14,10 @@ Requires: python-cffi
Patch1: 0001-Remove-remote-calling-unit-tests.patch
# From upstream:
# https://github.com/libgit2/pygit2/issues/597#issuecomment-187773503
Patch2: 0001-Attempt-to-fix-build-on-0.23.3.patch
%description
pygit2 is a set of Python bindings to the libgit2 library, which implements
the core of Git.
@ -73,19 +77,8 @@ find %{_builddir} -name '.buildinfo' -delete
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
%check
# https://github.com/libgit2/pygit2/issues/592
%{__python2} setup.py test \
%ifarch %{ix86}
|| :
%else
;
%endif
%{__python3} setup.py test \
%ifarch %{ix86}
|| :
%else
;
%endif
%{__python2} setup.py test
%{__python3} setup.py test
%files -n python2-%{pkgname}
%doc README.rst TODO.txt