Port to pyproject-rpm-macros and run the tests

epel9
Benjamin A. Beasley 1 year ago
parent ea45a3363a
commit 63cec5f99b

@ -16,7 +16,11 @@ Source: %{url}/archive/%{version}/wrapt-%{version}.tar.gz
BuildRequires: gcc BuildRequires: gcc
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: %{py3_dist setuptools}
# We bypass tox and instead BR and use pytest directly; this is simpler and
# avoids the need to patch out coverage analysis
# (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters).
BuildRequires: %{py3_dist pytest}
%global _description %{expand: %global _description %{expand:
The aim of the wrapt module is to provide a transparent object proxy for The aim of the wrapt module is to provide a transparent object proxy for
@ -48,13 +52,13 @@ BuildRequires: %{py3_dist sphinx_rtd_theme}
%endif %endif
%prep %prep
%setup -q -n wrapt-%{version} %autosetup -n wrapt-%{version}
# Remove bundled egg-info in case it exists %generate_buildrequires
rm -rf wrapt.egg-info %pyproject_buildrequires
%build %build
%py3_build %pyproject_wheel
%if %{with docs} %if %{with docs}
PYTHONPATH="${PWD}" %make_build -C docs latex \ PYTHONPATH="${PWD}" %make_build -C docs latex \
@ -63,7 +67,11 @@ PYTHONPATH="${PWD}" %make_build -C docs latex \
%endif %endif
%install %install
%py3_install %pyproject_install
%pyproject_save_files -l wrapt
%check
%pytest -v
%if %{with docs} %if %{with docs}
%files doc %files doc
@ -71,11 +79,8 @@ PYTHONPATH="${PWD}" %make_build -C docs latex \
%doc docs/_build/latex/wrapt.pdf %doc docs/_build/latex/wrapt.pdf
%endif %endif
%files -n python3-wrapt %files -n python3-wrapt -f %{pyproject_files}
%doc README.rst %doc README.rst
%license LICENSE
%{python3_sitearch}/wrapt
%{python3_sitearch}/wrapt-%{version}-py%{python3_version}.egg-info
%changelog %changelog
%autochangelog %autochangelog

Loading…
Cancel
Save