Convert to pyproject macros

epel9
Steve Traylen 3 years ago
parent 637046dc21
commit 240c74c4d5

@ -12,13 +12,6 @@ Source0: https://github.com/facelessuser/soupsieve/archive/%{version}/%{n
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
%if %{with tests}
BuildRequires: python3-pytest
BuildRequires: python3dist(lxml)
BuildRequires: python3dist(html5lib)
BuildRequires: python3dist(beautifulsoup4)
%endif
%global _description %{expand:
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4.
@ -48,24 +41,32 @@ Summary: %{summary}
%prep
%autosetup -n soupsieve-%{version}
# Do not run coverage report during check
sed -Ei 's/ ?--cov(-[^ ]+)? +[^ ]+//g' tox.ini
sed -i 's/coverage.*//' tox.ini
# Support posargs in tox.ini
sed -i 's/\(py\.test.*\)$/\1 \{posargs\}/' tox.ini
%generate_buildrequires
%pyproject_buildrequires %{?with_tests:-t}
%build
%py3_build
%pyproject_wheel
%install
%py3_install
%pyproject_install
%pyproject_save_files soupsieve
%if %{with tests}
%check
# test_contains_cdata_html and test_contains_own_cdata_html are disabled to unblock Python 3.10 rebuild
# downstream report: https://bugzilla.redhat.com/show_bug.cgi?id=1962458
pytest-3 -v tests -k 'not test_namespace_xml_with_namespace and not test_contains_cdata_html and not test_contains_own_cdata_html'
%tox -- -- -k 'not test_namespace_xml_with_namespace and not test_contains_cdata_html and not test_contains_own_cdata_html'
%endif
%files -n python3-soupsieve
%{python3_sitelib}/soupsieve/
%{python3_sitelib}/soupsieve*.egg-info/
%files -n python3-soupsieve -f %{pyproject_files}
%doc README.md
%license LICENSE.md
%changelog
%autochangelog

Loading…
Cancel
Save