From 67447ce1e93cd0725a5dc20e098ab44cc905fa95 Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Mon, 17 Sep 2012 21:58:06 +0200 Subject: [PATCH] initial import --- .gitignore | 1 + python-django-compressor.spec | 60 +++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 62 insertions(+) create mode 100644 python-django-compressor.spec diff --git a/.gitignore b/.gitignore index e69de29..9e07d36 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/django_compressor-1.2.tar.gz diff --git a/python-django-compressor.spec b/python-django-compressor.spec new file mode 100644 index 0000000..55dcc65 --- /dev/null +++ b/python-django-compressor.spec @@ -0,0 +1,60 @@ +%global pypi_name django_compressor + +Name: python-django-compressor +Version: 1.2 +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 + +%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 +* Fri Sep 14 2012 Matthias Runge - 1.2-2 +- add requirement python-versiontools + +* Tue Sep 11 2012 Matthias Runge - 1.2-1 +- Initial package. diff --git a/sources b/sources index e69de29..b3676c7 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +a740f2f67a3532cd0da412f0123e34c5 django_compressor-1.2.tar.gz