From d1e87528765d3a59be27ed29ca2f70eba34ef368 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Jan 24 2023 15:09:30 +0000 Subject: Update to version 1.1.1 --- diff --git a/.gitignore b/.gitignore index b9b1284..390ad6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/rcssmin-1.0.6.tar.gz +/rcssmin-*.tar.gz diff --git a/python-rcssmin.spec b/python-rcssmin.spec index 53b0284..d613801 100644 --- a/python-rcssmin.spec +++ b/python-rcssmin.spec @@ -1,20 +1,26 @@ -# Created by pyp2rpm-2.0.0 %global pypi_name rcssmin -%if 0%{?fedora} -%global with_python3 1 +%if 0%{?rhel} == 7 +%global with_python2 1 %endif Name: python-%{pypi_name} -Version: 1.0.6 -Release: 10%{?dist} +Version: 1.1.1 +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 +%if 0%{?with_python2} BuildRequires: python2-devel BuildRequires: python2-setuptools +BuildRequires: python2-pytest +BuildRequires: python2-mock +%endif +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pytest BuildRequires: gcc %description @@ -27,9 +33,10 @@ 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). +%if 0%{?with_python2} %package -n python2-%{pypi_name} Summary: CSS Minifier -%{?python_provide:%python_provide python2-%{pypi_name}} +%py_provides python2-%{pypi_name} %description -n python2-%{pypi_name} RCSSmin is a CSS minifier. @@ -40,16 +47,13 @@ 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). +%endif -%if 0%{?with_python3} -%package -n python3-%{pypi_name} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: CSS Minifier -%{?python_provide:%python_provide python3-%{pypi_name}} -BuildRequires: python3-devel -BuildRequires: python3-setuptools - +%py_provides python%{python3_pkgversion}-%{pypi_name} -%description -n python3-%{pypi_name} +%description -n python%{python3_pkgversion}-%{pypi_name} RCSSmin is a CSS minifier. The minifier is based on the semantics of the YUI compressor, which itself @@ -58,7 +62,6 @@ 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). -%endif %prep %autosetup -n %{pypi_name}-%{version} @@ -67,41 +70,45 @@ step). sed -i '1d' rcssmin.py %build +%if 0%{?with_python2} %py2_build -%if 0%{?with_python3} -%py3_build -%endif -%install -# Must do the subpackages' install first because the scripts in /usr/bin are -# overwritten with every setup.py install. -%if 0%{?with_python3} -%py3_install %endif +%py3_build +%install +%if 0%{?with_python2} %py2_install +%endif +%py3_install -# remove upstream developer documentation -rm -r %{buildroot}/%{_docdir}/%{pypi_name}/ +%check +%if 0%{?with_python2} +PYTHONPATH=%{buildroot}%{python2_sitearch} PYTHONDONTWRITEBYTECODE=1 py.test -v +%endif +PYTHONPATH=%{buildroot}%{python3_sitearch} PYTHONDONTWRITEBYTECODE=1 pytest-3 -v +%if 0%{?with_python2} %files -n python2-%{pypi_name} -%doc README.rst +%doc README.md %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 +%{python2_sitearch}/%{pypi_name}-%{version}-py%{python2_version}.egg-info +%endif -%if 0%{?with_python3} -%files -n python3-%{pypi_name} -%doc README.rst +%files -n python%{python3_pkgversion}-%{pypi_name} +%doc README.md %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 -%endif +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Tue Jan 24 2023 Mattias Ellert - 1.1.1-1 +- Update to version 1.1.1 + * Wed Feb 21 2018 Matthias Runge - 1.0.6-10 - add gcc to buildrequires diff --git a/sources b/sources index b7a3faf..bc7db1a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -467d56503ce386c0b0e52f69ac143a9a rcssmin-1.0.6.tar.gz +SHA512 (rcssmin-1.1.1.tar.gz) = 3439808f0e9165cac33756a2664fb4e3a314107422a952ebd42b28653519d91ba9e8f775cd499078c6d3faf103415c7c66eec05258f2dcfe85fee4f253399dfd