# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: GitPython Version: 0.1.6 Release: 2%{?dist} Summary: Python Git Library Group: Development/Languages License: BSD URL: http://pypi.python.org/pypi/GitPython/ Source0: http://pypi.python.org/packages/source/G/GitPython/GitPython-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel python-setuptools %description GitPython is a python library used to interact with Git repositories. GitPython provides object model access to your git repository. Once you have created a repository object, you can traverse it to find parent commit(s), trees, blobs, etc. GitPython is a port of the grit library in Ruby created by Tom Preston-Werner and Chris Wanstrath. %prep %setup -q %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README CHANGES LICENSE AUTHORS # For noarch packages: sitelib %{python_sitelib}/GitPython-%{version}-py*.egg-info %{python_sitelib}/git %changelog * Mon Jan 08 2010 Terje Rosten - 0.1.6-2 - Add python-setuptools to buildreq - Explicit file list - Use version macro in source url * Wed Jan 06 2010 Jesse Keating - 0.1.6-1 - Initial Fedora package