1
0
forked from pool/python-pygit2

- Drop the pygit2-0.28-Remove-pycparser-constraint.patch and replace

it with shorter sed
- Switch to pytest testing:
  * Fails now but that is pycparser bug https://github.com/eliben/pycparser/issues/305

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=45
This commit is contained in:
Tomáš Chvátal 2019-03-23 11:40:49 +00:00 committed by Git OBS Bridge
parent 7abfe8db2a
commit 7ea1c3f2fc
3 changed files with 19 additions and 36 deletions

View File

@ -1,28 +0,0 @@
From d612cc24a9e4d2f4aeb50db4ee0b4b393bf46298 Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa13@gmail.com>
Date: Wed, 20 Mar 2019 16:50:37 -0400
Subject: [PATCH] Revert "pycparser 2.18+ is broken"
Tests seem to work fine without this constraint.
This reverts commit b1bbdcb98643baf5d4d7634d7afc18feda56de52.
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 79e82df..3165e3d 100644
--- a/setup.py
+++ b/setup.py
@@ -154,7 +154,7 @@ setup(name='pygit2',
packages=['pygit2'],
package_data={'pygit2': ['decl.h']},
setup_requires=['cffi'],
- install_requires=['cffi', 'six', 'pycparser<2.18'],
+ install_requires=['cffi', 'six'],
zip_safe=False,
cmdclass=cmdclass,
**extra_args)
--
2.20.1

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sat Mar 23 11:32:34 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Drop the pygit2-0.28-Remove-pycparser-constraint.patch and replace
it with shorter sed
- Switch to pytest testing:
* Fails now but that is pycparser bug https://github.com/eliben/pycparser/issues/305
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 20 20:40:34 UTC 2019 - Neal Gompa <ngompa13@gmail.com> Wed Mar 20 20:40:34 UTC 2019 - Neal Gompa <ngompa13@gmail.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-pygit2 # spec file for package python-pygit2
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 Neal Gompa <ngompa13@gmail.com>. # Copyright (c) 2019 Neal Gompa <ngompa13@gmail.com>.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -13,12 +13,10 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# Define incompatible version for building libgit2
%global libgit2_incompat_ver 0.29
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pygit2 Name: python-pygit2
Version: 0.28.0 Version: 0.28.0
@ -28,18 +26,19 @@ License: GPL-2.0-only
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/libgit2/pygit2 URL: https://github.com/libgit2/pygit2
Source: https://files.pythonhosted.org/packages/source/p/pygit2/pygit2-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/pygit2/pygit2-%{version}.tar.gz
Patch0: pygit2-0.28-Remove-pycparser-constraint.patch
BuildRequires: %{python_module cffi} BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module pycparser}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six} BuildRequires: %{python_module six}
BuildRequires: ca-certificates BuildRequires: ca-certificates
BuildRequires: ca-certificates-mozilla BuildRequires: ca-certificates-mozilla
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: (libgit2-devel >= %{version} with libgit2-devel < %{libgit2_incompat_ver}) BuildRequires: libgit2-devel >= %{version}
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-pycparser
Requires: python-six Requires: python-six
%requires_eq python-cffi %requires_eq python-cffi
%python_subpackages %python_subpackages
@ -48,7 +47,11 @@ Requires: python-six
Bindings for libgit2, a linkable C library for the Git version-control system. Bindings for libgit2, a linkable C library for the Git version-control system.
%prep %prep
%autosetup -n pygit2-%{version} -p1 %setup -q -n pygit2-%{version}
# do not hardcode version
sed -i -e 's:pycparser<2.18:pycparser:g' setup.py
# do not add options to pytest
rm pytest.ini
%build %build
export CFLAGS="%{optflags} -fno-strict-aliasing" export CFLAGS="%{optflags} -fno-strict-aliasing"
@ -59,7 +62,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_expand %fdupes %{buildroot}%{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch}
%check %check
%python_exec setup.py test %pytest_arch
%files %{python_files} %files %{python_files}
%license COPYING %license COPYING