add python3 subpackge
This commit is contained in:
parent
013ddf2a33
commit
4d873703a4
1 changed files with 76 additions and 12 deletions
|
|
@ -1,8 +1,18 @@
|
|||
%{!?__python2:%global __python2 %{__python}}
|
||||
%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
|
||||
%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
|
||||
%{!?python2_version: %global python2_version %{python_version}}
|
||||
|
||||
%global pypi_name django_compressor
|
||||
%if 0%{?fedora} > 12
|
||||
%global with_python3 1
|
||||
%else
|
||||
%global with_python3 0
|
||||
%endif
|
||||
|
||||
Name: python-django-compressor
|
||||
Version: 1.5
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Compresses linked and inline JavaScript or CSS into single cached files
|
||||
|
||||
License: MIT
|
||||
|
|
@ -16,12 +26,7 @@ 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
|
||||
|
|
@ -31,24 +36,83 @@ or CSS in a Django templates into cacheable static files by using the
|
|||
parsed and searched for CSS or JS. These styles and scripts are subsequently
|
||||
processed with optional, configurable compilers and filters.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-django-compressor
|
||||
Summary: Compresses linked and inline JavaScript or CSS into single cached files
|
||||
Requires: python3-versiontools
|
||||
Requires: python3-django-appconf
|
||||
Requires: python3-django
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
%description -n python3-django-compressor
|
||||
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.
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{pypi_name}-%{version}
|
||||
%setup -qc
|
||||
mv %{pypi_name}-%{version} python2
|
||||
pushd python2
|
||||
|
||||
# copy license etc to top level dir
|
||||
cp -a LICENSE ..
|
||||
cp -a README.rst ..
|
||||
popd
|
||||
|
||||
%if 0%{?with_python3}
|
||||
cp -a python2 python3
|
||||
%endif
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
pushd python2
|
||||
%{__python2} setup.py build
|
||||
popd
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd python3
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%{__python} setup.py install --skip-build --root %{buildroot}
|
||||
pushd python2
|
||||
%{__python2} setup.py install --skip-build --root %{buildroot}
|
||||
popd
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd python3
|
||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
||||
|
||||
%files
|
||||
%doc README.rst LICENSE
|
||||
%{python_sitelib}/compressor
|
||||
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/compressor
|
||||
%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-django-compressor
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/compressor
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Aug 27 2015 Matthias Runge <mrunge@redhat.com> - 1.5-2
|
||||
- add python3 subpackage
|
||||
|
||||
* Wed Aug 26 2015 Matthias Runge <mrunge@redhat.com> - 1.5-1
|
||||
- update to 1.5
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue