Compare commits

..

No commits in common. "rawhide" and "f29" have entirely different histories.

5 changed files with 90 additions and 172 deletions

3
.gitignore vendored
View file

@ -1,2 +1 @@
/tinycss2-*.tar.gz
/css-parsing-tests-*.tar.gz
/tinycss2-0.6.1.tar.gz

View file

@ -1,22 +0,0 @@
#!/bin/bash
PROJECT=css-parsing-tests
REPO=git@github.com:SimonSapin/css-parsing-tests.git
githash=$1
if [ -z "$githash" ]; then
echo "usage: $0 GITHASH"
exit 1
fi
shorthash=${githash:0:8}
outputfile="${PROJECT}"-$shorthash.tar.gz
rm -rf "${PROJECT}"-temp
git clone "${REPO}" "${PROJECT}"-temp
cd "${PROJECT}"-temp
git archive --prefix="${PROJECT}"-$shorthash/ --format=tar ${githash} \
| gzip --stdout > ../$outputfile
cd ..
rm -rf "${PROJECT}"-temp
echo "exported source code in $outputfile"

View file

@ -0,0 +1,13 @@
diff --git a/setup.cfg b/setup.cfg
index ae602ff..a6452e5 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,7 @@ test = pytest
universal = 1
[tool:pytest]
-addopts = --cov=tinycss2 --flake8 --isort tinycss2/test.py
+addopts = --cov=tinycss2 tinycss2/test.py
norecursedirs = dist .cache .git build *.egg-info .eggs venv
[egg_info]

View file

@ -1,22 +1,40 @@
%global srcname tinycss2
%if 0%{?fedora}
%bcond_without python3
%else
%bcond_with python3
%endif
%global py2_prefix python2
%global py3_prefix python%{python3_pkgversion}
Name: python-%{srcname}
Version: 1.5.1
Release: 1%{?dist}
Version: 0.6.1
Release: 5%{?dist}
Summary: Low-level CSS parser for Python
License: BSD-3-Clause
URL: https://www.courtbouillon.org/tinycss2/
Source0: %{pypi_source tinycss2}
License: BSD
URL: https://pypi.python.org/pypi/%{srcname}/
Source0: https://files.pythonhosted.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz
# Fedora does not ship pytest's flake8/isort modules
Patch0: %{name}-disable-flake8-isort-for-pytest.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
# The test extra contains linters, we cherry-pick only what we need:
BuildRequires: python3-pytest
BuildRequires: %{py2_prefix}-devel
BuildRequires: %{py2_prefix}-pytest
BuildRequires: %{py2_prefix}-pytest-cov
# required to run the tests
BuildRequires: %{py2_prefix}-webencodings >= 0.4
%if %{with python3}
BuildRequires: %{py3_prefix}-devel
BuildRequires: %{py3_prefix}-pytest
BuildRequires: %{py3_prefix}-pytest-cov
# required for testing
BuildRequires: %{py3_prefix}-webencodings >= 0.4
%endif # with python3
%description
tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of
@ -24,170 +42,80 @@ tinycss with a simpler API, based on the more recent CSS Syntax Level 3
specification.
%package -n python3-%{srcname}
Summary: Low-level CSS parser for Python 3
%{?python_provide:%python_provide python3-%{srcname}}
%package -n %{py2_prefix}-%{srcname}
Summary: Low-level CSS parser for Python 2
Group: Development/Libraries
Requires: python2-webencodings >= 0.4
%{?python_provide:%python_provide %{py2_prefix}-%{srcname}}
%description -n python3-%{srcname}
%description -n %{py2_prefix}-%{srcname}
tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of
tinycss with a simpler API, based on the more recent CSS Syntax Level 3
specification.
%if %{with python3}
%package -n %{py3_prefix}-%{srcname}
Summary: Low-level CSS parser for Python 3
Group: Development/Libraries
Requires: %{py3_prefix}-webencodings >= 0.4
%{?python_provide:%python_provide %{py3_prefix}-%{srcname}}
%description -n %{py3_prefix}-%{srcname}
tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of
tinycss with a simpler API, based on the more recent CSS Syntax Level 3
specification.
%endif # with python3
%prep
%autosetup -n %{srcname}-%{version}
%generate_buildrequires
%pyproject_buildrequires -r
%build
%pyproject_wheel
%py2_build
%if %{with python3}
%py3_build
%endif # with python3
%install
%pyproject_install
%py2_install
%if %{with python3}
%py3_install
%endif # with python3
%check
%{pytest}
%{__python2} -m pytest -v
# remove files which are only required for unit tests (including test.pyc/.pyo)
rm -rf %{buildroot}%{python2_sitelib}/%{srcname}/css-parsing-tests
rm -rf %{buildroot}%{python2_sitelib}/%{srcname}/test.py*
%if %{with python3}
%{__python3} -m pytest -v
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/css-parsing-tests
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/test.py
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/__pycache__/test.*.py?
%endif # with python3
%files -n python3-%{srcname}
%files -n %{py2_prefix}-%{srcname}
%license LICENSE
%doc README.rst
%doc CHANGES README.rst
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info/
%if %{with python3}
%files -n %{py3_prefix}-%{srcname}
%license LICENSE
%doc CHANGES README.rst
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}-%{version}.dist-info/
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info/
%endif # with python3
%changelog
* Sun Nov 23 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 1.5.1-1
- update to 1.5.1
* Wed Nov 19 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 1.5.0-1
- update to 1.5.0
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 1.4.0-6
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 1.4.0-5
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 1.4.0-3
- Rebuilt for Python 3.14
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Oct 26 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 1.4.0-1
- update to 1.4.0
* Sat Oct 26 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 1.3.0-5
- SPDX conversion
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 1.3.0-4
- convert license to SPDX
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1.3.0-2
- Rebuilt for Python 3.13
* Tue Apr 23 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 1.3.0-1
- update to 1.3.0
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jul 01 2023 Python Maint <python-maint@redhat.com> - 1.2.1-4
- Rebuilt for Python 3.12
* Mon May 15 2023 Miro Hrončok <mhroncok@redhat.com> - 1.2.1-3
- Drop redundant build dependency on flit, this package uses flit-core
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Oct 18 2022 Felix Schwarz <fschwarz@fedoraproject.org> - 1.2.1-1
- update to 1.2.1
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.1.1-3
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Nov 22 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 1.1.1-1
- update to 1.1.1
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.1.0-3
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Nov 07 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 1.1.0-1
- update to 1.1.0
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jun 25 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 1.0.2-7
- add python3-setuptools to BuildRequires
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-6
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Apr 29 2019 Felix Schwarz <fschwarz@fedoraproject.org> 1.0.2-1
- update to new upstream version 1.0.2
* Thu Mar 07 2019 Felix Schwarz <fschwarz@fedoraproject.org> 1.0.1-1
- update to new upstream version
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Oct 12 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 0.6.1-7
- remove even more Python 2 leftovers
* Fri Oct 12 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.1-6
- Python2 binary package has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (tinycss2-1.5.1.tar.gz) = 1c2e1818c27c90f78b1e0af9b4c3c2a0944999691dcea678d0f5ed8a141d6ebd272b8b6763c1eac9d824db0d539e1e238f1e5e6abd2c02d97bb86002da637a10
SHA512 (tinycss2-0.6.1.tar.gz) = fa064bbb06d641a497a3c1eb35118bbf8ca8c4d32fbd3d8c64bb10d6cdab24387e77cd4c3277a957f23de2bd527a407836245f4387d7f880958858bd9cc7ab89