[packages/python3-cssselect2] - new

baggins baggins at pld-linux.org
Mon Sep 6 00:17:30 CEST 2021


commit bed17b88cbd5f12a63c0f4b2ec1f9e310c9d7e10
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Sep 6 00:17:08 2021 +0200

    - new

 disable-flake8-isort-pytest.patch | 31 +++++++++++++++++++++++
 python3-cssselect2.spec           | 53 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
---
diff --git a/python3-cssselect2.spec b/python3-cssselect2.spec
new file mode 100644
index 0000000..614b73f
--- /dev/null
+++ b/python3-cssselect2.spec
@@ -0,0 +1,53 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+
+Summary:	CSS selectors for Python ElementTree
+Name:		python3-cssselect2
+Version:	0.4.1
+Release:	1
+License:	BSD
+Source0:	https://files.pythonhosted.org/packages/source/c/cssselect2/cssselect2-%{version}.tar.gz
+# Source0-md5:	6dfd5963c8a5d85f2634d1650b1ddfe1
+Patch0:		disable-flake8-isort-pytest.patch
+URL:		https://cssselect2.readthedocs.io/
+%if %{with tests}
+BuildRequires:	python3-pytest
+BuildRequires:	python3-pytest-cov
+BuildRequires:	python3-pytest-runner
+BuildRequires:	python3-setuptools >= 39.2.0
+BuildRequires:	python3-tinycss2
+BuildRequires:	python3-webencodings
+%endif
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+cssselect2 is a straightforward implementation of CSS3 Selectors for
+markup documents (HTML, XML, etc.) that can be read by
+ElementTree-like parsers, including cElementTree, lxml, html5lib_,
+etc.
+
+%prep
+%setup -n cssselect2-%{version}
+%patch0 -p1
+
+%build
+%py3_build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%py3_install
+
+%if %{with tests}
+%{__python3} -m pytest -v
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%{py3_sitescriptdir}/cssselect2
+%{py3_sitescriptdir}/cssselect2-%{version}-py*.egg-info
diff --git a/disable-flake8-isort-pytest.patch b/disable-flake8-isort-pytest.patch
new file mode 100644
index 0000000..c458536
--- /dev/null
+++ b/disable-flake8-isort-pytest.patch
@@ -0,0 +1,31 @@
+--- cssselect2-0.4.1/pyproject.toml~	2020-10-29 23:04:17.000000000 +0100
++++ cssselect2-0.4.1/pyproject.toml	2021-09-06 00:14:20.391560891 +0200
+@@ -32,7 +32,7 @@
+ 
+ [tool.flit.metadata.requires-extra]
+ 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://doc.courtbouillon.org/cssselect2/'
+@@ -41,7 +41,7 @@
+ Donation = 'https://opencollective.com/courtbouillon'
+ 
+ [tool.pytest.ini_options]
+-addopts = '--isort --flake8 --cov'
++addopts = '--cov'
+ 
+ [tool.coverage.run]
+ branch = true
+--- cssselect2-0.4.1/setup.py~	1970-01-01 01:00:00.000000000 +0100
++++ cssselect2-0.4.1/setup.py	2021-09-06 00:14:36.034793563 +0200
+@@ -16,8 +16,6 @@
+ {'doc': ['sphinx', 'sphinx_rtd_theme'],
+  'test': ['pytest',
+           'pytest-cov',
+-          'pytest-flake8',
+-          'pytest-isort',
+           'coverage[toml]']}
+ 
+ setup(name='cssselect2',
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-cssselect2.git/commitdiff/bed17b88cbd5f12a63c0f4b2ec1f9e310c9d7e10



More information about the pld-cvs-commit mailing list