Blob Blame History Raw
# Created by pyp2rpm-2.0.0
%global pypi_name rcssmin

Name:           python-%{pypi_name}
Version:        1.0.6
Release:        1%{?dist}
Summary:        CSS Minifier

License:        ASL 2.0
URL:            http://opensource.perlig.de/rcssmin/
Source0:        https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

BuildRequires:  python2-devel
BuildRequires:  python-setuptools

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description
RCSSmin is a CSS minifier.

The minifier is based on the semantics of the YUI compressor, which itself
is based on the rule list by Isaac Schlueter.

This module is a re-implementation aiming for speed instead of maximum
compression, so it can be used at runtime (rather than during a preprocessing
step).

%package -n     python2-%{pypi_name}
Summary:        CSS Minifier
%{?python_provide:%python_provide python2-%{pypi_name}}

%description -n python2-%{pypi_name}
RCSSmin is a CSS minifier.

The minifier is based on the semantics of the YUI compressor, which itself
is based on the rule list by Isaac Schlueter.

This module is a re-implementation aiming for speed instead of maximum
compression, so it can be used at runtime (rather than during a preprocessing
step).

%package -n     python3-%{pypi_name}
Summary:        CSS Minifier
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
RCSSmin is a CSS minifier.

The minifier is based on the semantics of the YUI compressor, which itself
is based on the rule list by Isaac Schlueter.

This module is a re-implementation aiming for speed instead of maximum
compression, so it can be used at runtime (rather than during a preprocessing
step).


%prep
%autosetup -n %{pypi_name}-%{version}

# strip bang path from rcssmin.py
sed -i '1d' rcssmin.py

%build
%py2_build
%py3_build

%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install.
%py3_install

%py2_install

# remove upstream developer documentation
rm -r %{buildroot}/%{_docdir}/%{pypi_name}/

%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE bench/LICENSE.cssmin
%{python2_sitearch}/_%{pypi_name}.so
%{python2_sitearch}/%{pypi_name}.py
%{python2_sitearch}/%{pypi_name}.py[oc]
%{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE bench/LICENSE.cssmin
%{python3_sitearch}/%{pypi_name}.py
%{python3_sitearch}/_%{pypi_name}.cpython*
%{python3_sitearch}/__pycache__/%{pypi_name}.cpython*
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info

%changelog
* Fri Feb 26 2016 Matthias Runge <mrunge@redhat.com> - 1.0.6-1
- Initial package. (rhbz#1312360)