[packages/python-pygit2] initial version

draenog draenog at pld-linux.org
Mon Jun 10 03:20:19 CEST 2013


commit 01a65240579c9d60da3bf4c73c2eefc0a2b61b72
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Mon Jun 10 02:19:37 2013 +0100

    initial version

 python-pygit2.spec | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 129 insertions(+)
---
diff --git a/python-pygit2.spec b/python-pygit2.spec
new file mode 100644
index 0000000..a75a1f2
--- /dev/null
+++ b/python-pygit2.spec
@@ -0,0 +1,129 @@
+#
+# Conditional build:
+%bcond_without	tests	# do not perform "make test"
+%bcond_without	python3 # CPython 3.x module
+%bcond_without	docs	# documentation
+
+%define 	module	pygit2
+Summary:	Python bindings for libgit2 library
+Name:		python-%{module}
+Version:	0.18.1
+Release:	1
+License:	GPL v2 with linking exception
+Group:		Libraries/Python
+Source0:	http://pypi.python.org/packages/source/p//pygit2/%{module}-%{version}.tar.gz
+# Source0-md5:	8d27f84509a96d6791a6c393ae67d7c8
+URL:		https://pypi.python.org/pypi/pygit2
+BuildRequires:	python-devel
+BuildRequires:	python-distribute
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
+%if %{with python3}
+BuildRequires:	python3-devel
+BuildRequires:	python3-distribute
+BuildRequires:	python3-modules
+%endif
+%{?with_docs:BuildRequires:     sphinx-pdg}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+pygit2 is a set of Python bindings to the libgit2 shared library.
+
+%package -n	python3-%{module}
+Summary:	Python bindings for libgit2 library
+
+%description -n python3-%{module}
+pygit2 is a set of Python bindings to the libgit2 shared library.
+
+
+%package apidoc
+Summary:	pygit2 API documentation
+Summary(pl.UTF-8):	Dokumentacja API pygit2
+Group:		Documentation
+
+%description apidoc
+API documentation for %{module}.
+
+%description apidoc -l pl.UTF-8
+Dokumentacja API %{module}.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+
+%build
+%{__python} setup.py build --build-base build-2
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3
+%endif
+
+%{?with_tests:%{__python} setup.py test}
+
+%if %{with python3}
+%{__python3} setup.py \
+	build -b build-3
+
+%if %{with tests}
+%{__python3} setup.py test
+%endif
+%endif
+
+%if %{with docs}
+cd docs
+%{__make} -j1 html
+rm -rf _build/html/_sources
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__python} -- setup.py \
+	build -b build-2 \
+	install \
+	--root=$RPM_BUILD_ROOT \
+	--optimize=2
+%py_postclean
+
+%if %{with python3}
+%{__python3} setup.py \
+	build --build-base build-3 \
+	install \
+	--root=$RPM_BUILD_ROOT \
+	--optimize=2
+%endif
+
+
+# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING README.rst TODO.txt
+%dir %{py_sitedir}/%{module}
+%{py_sitedir}/pygit2/*.py[co]
+%attr(755,root,root) %{py_sitedir}/*.so
+%if "%{py_ver}" > "2.4"
+%{py_sitedir}/pygit2-*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc COPYING README.rst TODO.txt
+%dir %{py3_sitedir}/%{module}
+%attr(755,root,root) %{py3_sitedir}/*.so
+%{py3_sitedir}/%{module}/*.py
+%{py3_sitedir}/%{module}/__pycache__
+%{py3_sitedir}/pygit2-*.egg-info
+%endif
+
+%if %{with docs}
+%files apidoc
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pygit2.git/commitdiff/01a65240579c9d60da3bf4c73c2eefc0a2b61b72



More information about the pld-cvs-commit mailing list