%define lib_prefix django %define lib_name dajaxice Name: %{lib_prefix}-%{lib_name} Version: 0.1.8.1 Release: 1%{?dist} Summary: Agnostic and easy to use AJAX library for Django Group: Development/Libraries License: BSD with advertising URL: http://www.dajaxproject.com/ Source0: http://cloud.github.com/downloads/jorgebastida/%{name}/%{name}-%{version}.tar.gz # fill empty __init__.py files with '# empty' comment line # Sent upstream via email 20120510 Patch0: django-dajaxice-0.1.8.1-empty.patch BuildArch: noarch BuildRequires: python2-devel Requires: Django %description Easy to use AJAX library for Django, all the presentation logic resides outside the views and doesn't require any JS framework. dajaxice uses the unobtrusive standard-compliant (W3C) XMLHttpRequest 1.0 object. %prep %setup -q %patch0 -p1 %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT # remove empty source files and bytecomplied files for src_file in $(find $RPM_BUILD_ROOT -type f -size 0 -name "*.py") do rm ${src_file}{,c,o} done # remove remaining empty files find $RPM_BUILD_ROOT -type f -size 0 -delete %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CHANGELOG COPYING README %{python_sitelib}/%{lib_name} %{python_sitelib}/%{lib_prefix}_%{lib_name}-%{version}-py?.?.egg-info %changelog * Mon May 07 2012 Jakub Filak - 0.1.8.1-1 - Initial packaging