diff --git a/python-tinycss2-disable-flake8-isort-for-pytest.patch b/python-tinycss2-disable-flake8-isort-for-pytest.patch index d7a114b..02efafe 100644 --- a/python-tinycss2-disable-flake8-isort-for-pytest.patch +++ b/python-tinycss2-disable-flake8-isort-for-pytest.patch @@ -1,35 +1,20 @@ diff --git a/pyproject.toml b/pyproject.toml -index 41535ed..30dbcd4 100644 +index 6050fbb..8981947 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -32,7 +32,7 @@ classifiers = [ +@@ -41,13 +41,13 @@ Donation = 'https://opencollective.com/courtbouillon' - [tool.flit.metadata.requires-extra] + [project.optional-dependencies] doc = ['sphinx', 'sphinx_rtd_theme'] -test = ['pytest', 'pytest-cov', 'pytest-flake8', 'pytest-isort', 'coverage[toml]'] +test = ['pytest', 'pytest-cov', 'coverage[toml]'] - [tool.flit.metadata.urls] - Documentation = 'https://tinycss2.readthedocs.io/' -@@ -44,7 +44,7 @@ Donation = 'https://opencollective.com/courtbouillon' + [tool.flit.sdist] exclude = ['.*'] [tool.pytest.ini_options] --addopts = '--isort --flake8 --cov' -+addopts = '--cov' +-addopts = '--isort --flake8 --cov --no-cov-on-fail' ++addopts = '--cov --no-cov-on-fail' norecursedirs = ['tests/css-parsing-tests'] [tool.coverage.run] -diff --git a/setup.py b/setup.py -index 8e8a09c..8901670 100644 ---- a/setup.py -+++ b/setup.py -@@ -16,8 +16,6 @@ extras_require = \ - {'doc': ['sphinx', 'sphinx_rtd_theme'], - 'test': ['pytest', - 'pytest-cov', -- 'pytest-flake8', -- 'pytest-isort', - 'coverage[toml]']} - - setup(name='tinycss2', diff --git a/python-tinycss2.spec b/python-tinycss2.spec index 1c33b45..490a04f 100644 --- a/python-tinycss2.spec +++ b/python-tinycss2.spec @@ -6,31 +6,23 @@ Name: python-%{srcname} -Version: 1.1.0 -Release: 4%{?dist} +Version: 1.1.1 +Release: 1%{?dist} Summary: Low-level CSS parser for Python License: BSD URL: https://pypi.python.org/pypi/%{srcname}/ Source0: %pypi_source -Source1: export-git-snapshot.sh -# CSS parsing tests are governed by CC0 but not shipped in the final RPMs -# There are no releases for CSS parsing tests so the archive below was created -# with "export-git-snapshot.sh". -Source2: css-parsing-tests-c5749e5.tar.gz # Fedora does not ship pytest's flake8/isort modules Patch0: %{name}-disable-flake8-isort-for-pytest.patch BuildArch: noarch -BuildRequires: gzip -BuildRequires: tar -# required to run the tests -BuildRequires: %{py3_prefix}-devel -BuildRequires: %{py3_prefix}-pytest -BuildRequires: %{py3_prefix}-pytest-cov -BuildRequires: %{py3_prefix}-pytest-runner -BuildRequires: %{py3_prefix}-setuptools -BuildRequires: %{py3_prefix}-webencodings >= 0.4 +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +# used as "build-backend" in pyproject.toml but not detected by Fedora's +# macros to generate build requirements +BuildRequires: python3-flit + %description tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of @@ -51,19 +43,21 @@ specification. %prep %autosetup -n %{srcname}-%{version} -tar xf "%{SOURCE2}" -cp -a css-parsing-tests-???????/* tests/css-parsing-tests/ + +%generate_buildrequires +%pyproject_buildrequires -r -x test + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install %check -%{__python3} -m pytest -v +%{pytest} # remove files which are only required for unit tests (including test.pyc/.pyo) rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/css-parsing-tests rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/test.py @@ -74,10 +68,13 @@ rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/__pycache__/test.*.py? %license LICENSE %doc README.rst %{python3_sitelib}/%{srcname}/ -%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/%{srcname}-%{version}.dist-info/ %changelog +* Mon Nov 22 2021 Felix Schwarz - 1.1.1-1 +- update to 1.1.1 + * Tue Jul 27 2021 Fedora Release Engineering - 1.1.0-4 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 24f65c7..20c128b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (tinycss2-1.1.0.tar.gz) = 218d28511802afc89a608def03084f5d460512a41d47280b5c8bfe72314c8ab3b14c98fbb0200bea6b8509c4d6f0107410d340e2d7f1830aaa92669a2699211e -SHA512 (css-parsing-tests-c5749e5.tar.gz) = afb0248a2941bcd18904ad2021da902697385d716256019b88ded22836df0ad76e53a76cc4232546f7c3a2421785b94befb057cf99a22b423d1051e38d8cd3f6 +SHA512 (tinycss2-1.1.1.tar.gz) = 297ac51cf4eb9a063e88d677b8cf2511ff6c459c7a385ee8ba6bb4b9d9b0d8482f5caa1cc6511d3edefbe8e8ee284d72fedc154a5372880cd7d9a9a26aab1a62