Port to pyproject-rpm-macros

This commit is contained in:
Benjamin A. Beasley 2022-05-10 12:07:45 -04:00
parent bea0c4d1e0
commit 86932b9de3

View File

@ -1,53 +1,50 @@
# Enabled by default # Enabled by default
%bcond_without tests %bcond_without tests
%global pypi_name pytest-lazy-fixture Name: python-pytest-lazy-fixture
%global _description %{expand:
Use fixtures in pytest.mark.parametrize.}
Name: python-%{pypi_name}
Version: 0.6.3 Version: 0.6.3
Release: %autorelease Release: %autorelease
Summary: Use fixtures in pytest.mark.parametrize Summary: Use fixtures in pytest.mark.parametrize
License: MIT License: MIT
URL: https://pypi.python.org/pypi/%{pypi_name} URL: https://github.com/tvorog/pytest-lazy-fixture
Source0: %pypi_source %{pypi_name} Source0: %{pypi_source pytest-lazy-fixture}
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-devel
%global _description %{expand:
Use fixtures in pytest.mark.parametrize.}
%description %_description %description %_description
%package -n python3-%{pypi_name} %package -n python3-pytest-lazy-fixture
Summary: %{summary} Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: %{py3_dist pytest}
BuildRequires: %{py3_dist setuptools}
%description -n python3-%{pypi_name} %_description %description -n python3-pytest-lazy-fixture %_description
%prep %prep
%autosetup -n %{pypi_name}-%{version} %autosetup -n pytest-lazy-fixture-%{version}
rm -rf %{pypi_name}.egg-info
%generate_buildrequires
%pyproject_buildrequires
%build %build
%py3_build %pyproject_wheel
%install %install
%py3_install %pyproject_install
%pyproject_save_files pytest_lazyfixture
%check %check
%if %{with tests} %if %{with tests}
PYTHONPATH="%{buildroot}/%{python3_sitelib}/" pytest-3 %pytest
%endif %endif
%files -n python3-%{pypi_name} %files -n python3-pytest-lazy-fixture -f %{pyproject_files}
%license LICENSE # pyproject_files handles LICENSE; verify with “rpm -qL -p …”
%doc README.rst %doc README.rst
%{python3_sitelib}/pytest_lazy_fixture-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/pytest_lazyfixture.py
%{python3_sitelib}/__pycache__
%changelog %changelog
%autochangelog %autochangelog