3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 %define pypi_name rcssmin
8 Summary: RCSSmin is a CSS minifier
9 Name: python-%{pypi_name}
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
15 # Source0-md5: 467d56503ce386c0b0e52f69ac143a9a
16 URL: http://opensource.perlig.de/rcssmin/
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-modules
21 BuildRequires: python-setuptools
24 BuildRequires: python3-modules
25 BuildRequires: python3-setuptools
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 The minifier is based on the semantics of the YUI compressor, which
31 itself is based on the rule list by Isaac Schlueter.
33 This module is a re-implementation aiming for speed instead of maximum
34 compression, so it can be used at runtime (rather than during a
37 %package -n python3-%{pypi_name}
38 Summary: RCSSmin is a CSS minifier
39 Group: Libraries/Python
41 %description -n python3-%{pypi_name}
42 RCSSmin is a CSS minifier.
44 The minifier is based on the semantics of the YUI compressor, which
45 itself is based on the rule list by Isaac Schlueter.
47 This module is a re-implementation aiming for speed instead of maximum
48 compression, so it can be used at runtime (rather than during a
52 Summary: %{module} API documentation
53 Summary(pl.UTF-8): Dokumentacja API %{module}
58 API documentation for %{module}.
60 %description apidocs -l pl.UTF-8
61 Dokumentacja API %{module}.
64 %setup -q -n %{pypi_name}-%{version}
66 # strip bang path from rcssmin.py
67 sed -i '1d' rcssmin.py
79 rm -rf $RPM_BUILD_ROOT
89 # remove upstream developer documentation
90 rm -r $RPM_BUILD_ROOT%{_docdir}/%{module}
93 rm -rf $RPM_BUILD_ROOT
97 %defattr(644,root,root,755)
98 %doc README.rst LICENSE bench/LICENSE.cssmin
99 %attr(755,root,root) %{py_sitedir}/_%{module}.so
100 %{py_sitedir}/%{module}.py[oc]
101 %{py_sitedir}/%{pypi_name}-%{version}-py*.egg-info
105 %files -n python3-%{pypi_name}
106 %defattr(644,root,root,755)
107 %doc README.rst LICENSE bench/LICENSE.cssmin
108 %{py3_sitedir}/%{module}.py
109 %attr(755,root,root) %{py3_sitedir}/_%{module}.*.so
110 %{py3_sitedir}/__pycache__/%{module}.*
111 %{py3_sitedir}/%{pypi_name}-%{version}-py*.egg-info
115 %defattr(644,root,root,755)