# # spec file for package python-pygit2 # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 Neal Gompa . # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # Define incompatible version for building libgit2 %global libgit2_incompat_ver 0.29 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pygit2 Version: 0.28.0 Release: 0 Summary: Python bindings for libgit2 License: GPL-2.0-only Group: Development/Languages/Python URL: https://github.com/libgit2/pygit2 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 devel} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: ca-certificates BuildRequires: ca-certificates-mozilla BuildRequires: fdupes BuildRequires: (libgit2-devel >= %{version} with libgit2-devel < %{libgit2_incompat_ver}) BuildRequires: libopenssl-devel BuildRequires: python-rpm-macros Requires: python-six %requires_eq python-cffi %python_subpackages %description Bindings for libgit2, a linkable C library for the Git version-control system. %prep %autosetup -n pygit2-%{version} -p1 %build export CFLAGS="%{optflags} -fno-strict-aliasing" %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %check %python_exec setup.py test %files %{python_files} %license COPYING %doc README.rst %{python_sitearch}/* %changelog