forked from mcepl/python-pygit2
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=2
This commit is contained in:
committed by
Git OBS Bridge
parent
d281e2cab7
commit
4e1e87afc7
@@ -15,23 +15,18 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
%define mod_name pygit2
|
||||
|
||||
Name: python-%{mod_name}
|
||||
Name: python-pygit2
|
||||
Version: 0.1
|
||||
Release: 0
|
||||
Url: http://github.com/dborowitz/pygit2
|
||||
Summary: Python bindings for libgit2
|
||||
License: Apache 2.0
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Source: %{mod_name}-%{version}.tar.bz2
|
||||
Patch0: %{mod_name}-%{version}-libgit2-updates.patch
|
||||
Source: libgit2-pygit2-v0.15.0-0-g1dde686.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-devel libgit2-devel
|
||||
BuildRequires: libgit2-devel
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
BuildRequires: openssl-devel
|
||||
%else
|
||||
@@ -40,14 +35,14 @@ BuildRequires: libopenssl-devel
|
||||
%if 0%{?suse_version}
|
||||
%py_requires
|
||||
%endif
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
%description
|
||||
Bindings for libgit2, a linkable C library for the Git version-control system.
|
||||
|
||||
%prep
|
||||
export CFLAGS="%{optflags}"
|
||||
%setup -n %{mod_name}
|
||||
%patch0 -p1
|
||||
%setup -n libgit2-pygit2-1dde686
|
||||
# Adjust include/lib paths to local system
|
||||
sed -i 's|/usr/local/include|%{_includedir}|' setup.py
|
||||
sed -i 's|/usr/local/lib|%{_libdir}|' setup.py
|
||||
@@ -58,12 +53,12 @@ python setup.py build
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
#%%check
|
||||
#python setup.py test
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.md COPYING
|
||||
%python_sitearch/%{mod_name}*
|
||||
%python_sitearch/pygit2*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user