a71c7fc
a71c7fc
%global srcname tinycss2
a71c7fc
a71c7fc
a71c7fc
%global py3_prefix python%{python3_pkgversion}
a71c7fc
a71c7fc
a71c7fc
Name:           python-%{srcname}
db43cdd
Version:        1.1.0
a8864e6
Release:        3%{?dist}
a71c7fc
Summary:        Low-level CSS parser for Python
a71c7fc
a71c7fc
License:        BSD
a71c7fc
URL:            https://pypi.python.org/pypi/%{srcname}/
b17eecf
Source0:        %pypi_source
db43cdd
Source1:        export-git-snapshot.sh
db43cdd
# CSS parsing tests are governed by CC0 but not shipped in the final RPMs
db43cdd
# There are no releases for CSS parsing tests so the archive below was created
db43cdd
# with "export-git-snapshot.sh".
db43cdd
Source2:        css-parsing-tests-c5749e5.tar.gz
a71c7fc
# Fedora does not ship pytest's flake8/isort modules
a71c7fc
Patch0:         %{name}-disable-flake8-isort-for-pytest.patch
a71c7fc
a71c7fc
BuildArch:      noarch
db43cdd
BuildRequires:  gzip
db43cdd
BuildRequires:  tar
a71c7fc
# required to run the tests
a71c7fc
BuildRequires:  %{py3_prefix}-devel
a71c7fc
BuildRequires:  %{py3_prefix}-pytest
a71c7fc
BuildRequires:  %{py3_prefix}-pytest-cov
cb41dc0
BuildRequires:  %{py3_prefix}-pytest-runner
fb5ce51
BuildRequires:  %{py3_prefix}-setuptools
a71c7fc
BuildRequires:  %{py3_prefix}-webencodings >= 0.4
a71c7fc
a71c7fc
%description
a71c7fc
tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of
a71c7fc
tinycss with a simpler API, based on the more recent CSS Syntax Level 3
a71c7fc
specification.
a71c7fc
a71c7fc
a71c7fc
%package     -n %{py3_prefix}-%{srcname}
a71c7fc
Summary:        Low-level CSS parser for Python 3
a71c7fc
Requires:       %{py3_prefix}-webencodings >= 0.4
a71c7fc
%{?python_provide:%python_provide %{py3_prefix}-%{srcname}}
a71c7fc
a71c7fc
%description -n %{py3_prefix}-%{srcname}
a71c7fc
tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of
a71c7fc
tinycss with a simpler API, based on the more recent CSS Syntax Level 3
a71c7fc
specification.
a71c7fc
a71c7fc
a71c7fc
%prep
a71c7fc
%autosetup -n %{srcname}-%{version}
db43cdd
tar xf "%{SOURCE2}"
db43cdd
cp -a css-parsing-tests-???????/* tests/css-parsing-tests/
a71c7fc
a71c7fc
%build
a71c7fc
%py3_build
a71c7fc
a71c7fc
a71c7fc
%install
a71c7fc
%py3_install
a71c7fc
a71c7fc
a71c7fc
%check
a71c7fc
%{__python3} -m pytest -v
9810cd9
# remove files which are only required for unit tests (including test.pyc/.pyo)
a71c7fc
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/css-parsing-tests
a71c7fc
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/test.py
a71c7fc
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/__pycache__/test.*.py?
a71c7fc
a71c7fc
a71c7fc
%files -n %{py3_prefix}-%{srcname}
a71c7fc
%license LICENSE
cb41dc0
%doc README.rst
a71c7fc
%{python3_sitelib}/%{srcname}/
db43cdd
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
a71c7fc
a71c7fc
a71c7fc
%changelog
a8864e6
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.1.0-3
a8864e6
- Rebuilt for Python 3.10
a8864e6
817699e
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
817699e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
817699e
db43cdd
* Sat Nov 07 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 1.1.0-1
db43cdd
- update to 1.1.0
db43cdd
e0e10b2
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-8
e0e10b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
e0e10b2
fb5ce51
* Thu Jun 25 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 1.0.2-7
fb5ce51
- add python3-setuptools to BuildRequires
fb5ce51
864516f
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-6
864516f
- Rebuilt for Python 3.9
864516f
147cd40
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
147cd40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
147cd40
c081b86
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-4
c081b86
- Rebuilt for Python 3.8.0rc1 (#1748018)
c081b86
251aff2
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-3
251aff2
- Rebuilt for Python 3.8
251aff2
2831561
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-2
2831561
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2831561
89505aa
* Mon Apr 29 2019 Felix Schwarz <fschwarz@fedoraproject.org> 1.0.2-1
89505aa
- update to new upstream version 1.0.2
89505aa
cb41dc0
* Thu Mar 07 2019 Felix Schwarz <fschwarz@fedoraproject.org> 1.0.1-1
cb41dc0
- update to new upstream version
cb41dc0
8eb8283
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-8
8eb8283
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8eb8283
9810cd9
* Fri Oct 12 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 0.6.1-7
9810cd9
- remove even more Python 2 leftovers
9810cd9
804f873
* Fri Oct 12 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.1-6
804f873
- Python2 binary package has been removed
804f873
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
804f873
6e2330a
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-5
6e2330a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
6e2330a
f8077bb
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-4
f8077bb
- Rebuilt for Python 3.7
f8077bb
cada559
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-3
cada559
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cada559
a71c7fc
* Sat Dec 16 2017 Felix Schwarz <fschwarz@fedoraproject.org> 0.6.1-2
a71c7fc
- remove also generated bytecode for test.py in Python 3
a71c7fc
- more specific files specification
a71c7fc
a71c7fc
* Tue Dec 12 2017 Felix Schwarz <fschwarz@fedoraproject.org> 0.6.1-1
a71c7fc
- initial package
a71c7fc