%global pypi_name django_compressor Name: python-django-compressor Version: 1.4 Release: 3%{?dist} Summary: Compresses linked and inline JavaScript or CSS into single cached files License: MIT URL: http://pypi.python.org/pypi/django_compressor/%{version} Source0: http://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz # All patches are directly connected to Django-1.8 # # cherry-pick from upstream # https://github.com/django-compressor/django-compressor/commit/c8495264b503a595fbc89e6c8a83a402eff445c6.patch Patch0001: django-compressor-use-get_template.patch # cherry-pick from upstream # https://github.com/django-compressor/django-compressor/commit/ac70fbfb7f8349e5c1150f40bf1d21ba635d0cb8.patch Patch0002: django-compressor-fix-attributeerror-in-offline.patch # cherry-pick from upstream # https://github.com/django-compressor/django-compressor/commit/72b33ddbcdc41eb5af42b86329d81d96894a9d10.patch Patch0003: django-compressor-make-compress-run-through.patch 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} %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 # 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 * Wed Apr 15 2015 Matthias Runge - 1.4-3 - make compress command work on django-1.8 * Sat Jun 07 2014 Fedora Release Engineering - 1.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon May 26 2014 Matthias Runge - 1.4-1 - update to 1.4 (rhbz#1100732) * Sun Aug 04 2013 Fedora Release Engineering - 1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Mar 20 2013 Matthias Runge - 1.3-1 - update to python-django-compressor-1.3 (rhbz#923735) * Thu Feb 14 2013 Fedora Release Engineering - 1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Mon Sep 24 2012 Matthias Runge - 1.2-3 - add requirement Django/python-django * Fri Sep 14 2012 Matthias Runge - 1.2-2 - add requirement python-versiontools * Tue Sep 11 2012 Matthias Runge - 1.2-1 - Initial package.