78 lines
2.3 KiB
RPMSpec
78 lines
2.3 KiB
RPMSpec
%global pypi_name django_compressor
|
|
|
|
Name: python-django-compressor
|
|
Version: 1.3
|
|
Release: 2%{?dist}
|
|
Summary: Compresses linked and inline JavaScript or CSS into single cached files
|
|
|
|
License: MIT
|
|
URL: http://pypi.python.org/pypi/django_compressor/1.2
|
|
Source0: http://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python-setuptools
|
|
|
|
Requires: python-django-appconf >= 0.4
|
|
Requires: python-versiontools
|
|
|
|
%if 0%{?rhel}<7 || 0%{?fedora} < 18
|
|
Requires: Django
|
|
%else
|
|
Requires: python-django
|
|
%endif
|
|
|
|
%description
|
|
Django Compressor combines and compresses linked and inline Javascript
|
|
or CSS in a Django templates into cacheable static files by using the
|
|
``compress`` template tag. HTML in between
|
|
``{% compress js/css %}`` and ``{% endcompress %}`` is
|
|
parsed and searched for CSS or JS. These styles and scripts are subsequently
|
|
processed with optional, configurable compilers and filters.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{pypi_name}-%{version}
|
|
# Remove bundled egg-info
|
|
rm -rf %{pypi_name}.egg-info
|
|
|
|
# remove /usr/bin/env from scripts
|
|
for i in compressor/tests/precompiler.py \
|
|
compressor/filters/cssmin/cssmin.py \
|
|
compressor/filters/jsmin/rjsmin.py;
|
|
do sed -i -e "1d" $i;
|
|
done
|
|
|
|
|
|
|
|
%build
|
|
%{__python} setup.py build
|
|
|
|
|
|
%install
|
|
%{__python} setup.py install --skip-build --root %{buildroot}
|
|
|
|
|
|
%files
|
|
%doc README.rst LICENSE
|
|
%{python_sitelib}/compressor
|
|
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
|
%changelog
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Wed Mar 20 2013 Matthias Runge <mrunge@redhat.com> - 1.3-1
|
|
- update to python-django-compressor-1.3 (rhbz#923735)
|
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
* Mon Sep 24 2012 Matthias Runge <mrunge@redhat.com> - 1.2-3
|
|
- add requirement Django/python-django
|
|
|
|
* Fri Sep 14 2012 Matthias Runge <mrunge@redhat.com> - 1.2-2
|
|
- add requirement python-versiontools
|
|
|
|
* Tue Sep 11 2012 Matthias Runge <mrunge@redhat.com> - 1.2-1
|
|
- Initial package.
|