From 81771194d42eeddd742ea014b270604c0453368b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 4 Sep 2020 00:29:05 +0200 Subject: [PATCH] Use pyproject-rpm-macros --- python-toml.spec | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/python-toml.spec b/python-toml.spec index cea5ef3..41fa75d 100644 --- a/python-toml.spec +++ b/python-toml.spec @@ -7,7 +7,7 @@ toml file. Name: python-%{pypi_name} Version: 0.10.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python Library for Tom's Obvious, Minimal Language License: MIT @@ -17,56 +17,61 @@ Source0: %{pypi_source} BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: pyproject-rpm-macros %bcond_without tests %if %{with tests} -BuildRequires: python%{python3_pkgversion}-numpy -BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: /usr/bin/toml-test %endif %description %desc + %package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{summary} -BuildRequires: python%{python3_pkgversion}-devel %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} %description -n python%{python3_pkgversion}-%{pypi_name} %desc + %prep -%setup -q -n %{pypi_name}-%{version} +%autosetup -p1 -n %{pypi_name}-%{version} + + +%generate_buildrequires +%pyproject_buildrequires %{?with_tests:-t} %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files %{pypi_name} %if %{with tests} %check ln -s /usr/share/toml-test/ . # python tests require test cases here -%pytest +%tox # Also using the language independent toml-test suite to launch tests ln -s /usr/share/toml-test/tests/* tests/ # toml-test requires them here toml-test $(pwd)/tests/decoding_test3.sh %endif -%files -n python%{python3_pkgversion}-%{pypi_name} +%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.rst -%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info -%{python3_sitelib}/%{pypi_name}/ %changelog +* Thu Sep 03 2020 Miro HronĨok - 0.10.1-3 +- Use pyproject-rpm-macros + * Wed Jul 29 2020 Fedora Release Engineering - 0.10.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild