From 690ccd862ec20629412455517a225ae9f4449122 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: May 29 2022 21:42:59 +0000 Subject: Update to 2.4.0, drop a bunch of linters and switch to pyproject macros Signed-off-by: Kevin Fenzi --- diff --git a/.gitignore b/.gitignore index 2a8ffd6..ec1eeb4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ cssutils-0.9.6.zip /cssutils-1.0.2.tar.gz /cssutils-2.2.0.tar.gz /cssutils-2.3.0.tar.gz +/cssutils-2.4.0.tar.gz diff --git a/cssutils-2.4.0-test-deps.patch b/cssutils-2.4.0-test-deps.patch new file mode 100644 index 0000000..9110f06 --- /dev/null +++ b/cssutils-2.4.0-test-deps.patch @@ -0,0 +1,88 @@ +diff --color -Nur cssutils-2.4.0.orig/cssutils.egg-info/requires.txt cssutils-2.4.0/cssutils.egg-info/requires.txt +--- cssutils-2.4.0.orig/cssutils.egg-info/requires.txt 2022-02-22 17:19:04.000000000 -0800 ++++ cssutils-2.4.0/cssutils.egg-info/requires.txt 2022-05-28 13:58:35.691494189 -0700 +@@ -9,17 +9,17 @@ + + [testing] + pytest>=6 +-pytest-checkdocs>=2.4 +-pytest-flake8 ++#pytest-checkdocs>=2.4 ++#pytest-flake8 + pytest-cov + pytest-enabler>=1.0.1 + mock + lxml + cssselect + +-[testing:platform_python_implementation != "PyPy"] +-pytest-black>=0.3.7 +-pytest-mypy>=0.9.1 ++#[testing:platform_python_implementation != "PyPy"] ++#pytest-black>=0.3.7 ++#pytest-mypy>=0.9.1 + + [testing:python_version < "3.9"] + importlib_resources +diff --color -Nur cssutils-2.4.0.orig/examples/website.py cssutils-2.4.0/examples/website.py +--- cssutils-2.4.0.orig/examples/website.py 2022-02-22 17:18:44.000000000 -0800 ++++ cssutils-2.4.0/examples/website.py 2022-05-28 15:41:38.568224880 -0700 +@@ -58,8 +58,8 @@ + >>> sheet = cssutils.parseString('a { x: 1; } @import "http://cthedot.de/not-present.css";') + >>> print(mylog.getvalue()) + WARNING Property: Unknown Property name. [1:5: x] +- WARNING HTTPError opening url=http://cthedot.de/not-present.css: 404 Not Found +- WARNING CSSImportRule: While processing imported style sheet href=http://cthedot.de/not-present.css: OSError('Cannot read Stylesheet.'...) ++ WARNING URLError, [Errno -3] Temporary failure in name resolution ++ WARNING CSSImportRule: While processing imported style sheet href=http://cthedot.de/not-present.css: OSError('Cannot read Stylesheet.') + ERROR CSSStylesheet: CSSImportRule not allowed here. [1:13: @import] + + """ +diff --color -Nur cssutils-2.4.0.orig/pyproject.toml cssutils-2.4.0/pyproject.toml +--- cssutils-2.4.0.orig/pyproject.toml 2022-02-22 17:18:44.000000000 -0800 ++++ cssutils-2.4.0/pyproject.toml 2022-05-28 13:51:22.943097633 -0700 +@@ -7,14 +7,14 @@ + + [tool.setuptools_scm] + +-[pytest.enabler.black] +-addopts = "--black" ++#[pytest.enabler.black] ++#addopts = "--black" + +-[pytest.enabler.mypy] ++#[pytest.enabler.mypy] + # addopts = "--mypy" + +-[pytest.enabler.flake8] +-addopts = "--flake8" ++#[pytest.enabler.flake8] ++#addopts = "--flake8" + + [pytest.enabler.cov] + addopts = "--cov" +diff --color -Nur cssutils-2.4.0.orig/setup.cfg cssutils-2.4.0/setup.cfg +--- cssutils-2.4.0.orig/setup.cfg 2022-02-22 17:19:04.508949000 -0800 ++++ cssutils-2.4.0/setup.cfg 2022-05-28 13:58:44.504461532 -0700 +@@ -38,14 +38,14 @@ + [options.extras_require] + testing = + pytest >= 6 +- pytest-checkdocs >= 2.4 +- pytest-flake8 +- pytest-black >= 0.3.7; \ +- python_implementation != "PyPy" ++# pytest-checkdocs >= 2.4 ++# pytest-flake8 ++# pytest-black >= 0.3.7; \ ++# python_implementation != "PyPy" + pytest-cov +- pytest-mypy >= 0.9.1; \ +- python_implementation != "PyPy" +- pytest-enabler >= 1.0.1 ++# pytest-mypy >= 0.9.1; \ ++# python_implementation != "PyPy" ++# pytest-enabler >= 1.0.1 + + mock + lxml diff --git a/python-cssutils.spec b/python-cssutils.spec index 74fbc56..0a76c01 100644 --- a/python-cssutils.spec +++ b/python-cssutils.spec @@ -5,8 +5,8 @@ Name: python-%{srcname} Summary: CSS Cascading Style Sheets library for Python -Version: 2.3.0 -Release: 3%{?dist} +Version: 2.4.0 +Release: 1%{?dist} License: LGPLv3+ URL: https://github.com/jaraco/cssutils @@ -14,8 +14,11 @@ Source0: %pypi_source # no network access in the buildsystem, so disable tests that try and use net Patch0: cssutils-2.2.0-disable-external-tests.patch +# Disable some test deps +Patch1: cssutils-2.4.0-test-deps.patch BuildArch: noarch +BuildRequires: python3-devel %global _description \ A Python package to parse and build CSS Cascading Style Sheets. DOM only, not\ @@ -32,7 +35,6 @@ Summary: Documentation for %{name} %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} -BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-setuptools_scm+toml %if %{with tests} @@ -51,23 +53,26 @@ any rendering facilities. %prep %autosetup -p1 -n cssutils-%{version} + +%generate_buildrequires + +%pyproject_buildrequires -t + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files *utils %if %{with tests} %check -%pytest -vv -k "not test_literalname and not test_specificity and not website.logging" +%tox %endif -%files -n python3-%{srcname} +%files -n python3-%{srcname} -f %{pyproject_files} %license COPYING COPYING.LESSER %doc README.rst -%{python3_sitelib}/%{srcname}-*.egg-info/ -%{python3_sitelib}/%{srcname}/ -%{python3_sitelib}/encutils/ %{_bindir}/csscapture %{_bindir}/csscombine %{_bindir}/cssparse @@ -76,6 +81,9 @@ any rendering facilities. %doc examples/ %changelog +* Sat May 28 2022 Kevin Fenzi - 2.4.0-1 +- Update to 2.4.0. Fixes rhbz#2057228 + * Fri Jan 21 2022 Fedora Release Engineering - 2.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index d3e6fff..54f21d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cssutils-2.3.0.tar.gz) = 9919224a61222e860a99ec80e6375a472b89c52af72272c1de7bcd5fd31cf8570a04da7762c62a17a85bef2c41b1c67447583087df4c86c1f8969ad4875a76d2 +SHA512 (cssutils-2.4.0.tar.gz) = 53e18f9d06905dbda5382a3ed6ef1808571e8a32204864364b0a344e641c774f0998bf23ad0997b34ddbe9f04d3d2c7d622249cfeb0a9e846f7fb1530ae9b12b