%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} # This is a pre-release of 0.5, so we follow the pre-release # naming here: # https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Pre-Release_packages # to try to preserve the upgrade path %define alphatag rc1 Name: python-djblets Version: 0.5 Release: 0.1.%{alphatag}%{?dist} Summary: A collection of useful classes and functions for Django Group: Applications/Internet License: MIT URL: http://www.review-board.org Source0: http://downloads.review-board.org/releases/Djblets-%{version}%{alphatag}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools-devel Requires: Django >= 1.0.2 Requires: python-imaging %description A collection of useful classes and functions for Django %prep %setup -q -n Djblets-%{version}%{alphatag} sed -i 's/^from ez_setup/#from ez_setup/' setup.py sed -i 's/^use_setuptools()/#use_setuptools()/' setup.py %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --root $RPM_BUILD_ROOT # feedparser.py has a shebang, and has a runnable __main__; make it executable: chmod +x $RPM_BUILD_ROOT%{python_sitelib}/djblets/feedview/feedparser.py # Remove the "tests" subdirectory to avoid it polluting the main python # namespace: rm -rf $RPM_BUILD_ROOT%{python_sitelib}/tests %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc NEWS AUTHORS %{python_sitelib}/* %changelog * Thu May 7 2009 David Malcolm - 0.5-0.1.rc1 - bump to upstream 0.5rc1 - add NEWS and AUTHORS files as documentation * Thu May 7 2009 David Malcolm - 0.5-0.1.alpha3 - rename from Djblets to python-djblets - update version/release to try to preserve update path (prerelease issues) - fix mixed tabs/spaces in specfile (use spaces throughout) - remove tests subdirectory - make feedparser.py executable * Sat Feb 21 2009 Ramez Hanna - First build.