From c6fbfeb07d88101da3aec65c221b3ade887a0f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 10 May 2021 19:45:03 +0200 Subject: [PATCH] Convert to pyproject macros, update description, URL, .gitignore... --- .gitignore | 18 ++---------------- python-six.spec | 33 +++++++++++++++++---------------- 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 511c0b6..032edf1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,2 @@ -/six-1.0.0.tar.gz -/six-1.1.0.tar.gz -/six-1.2.0.tar.gz -/six-1.3.0.tar.gz -/six-1.4.1.tar.gz -/six-1.5.2.tar.gz -/six-1.6.1.tar.gz -/six-1.7.3.tar.gz -/six-1.8.0.tar.gz -/six-1.9.0.tar.gz -/six-1.10.0.tar.gz -/six-1.11.0.tar.gz -/six-1.12.0.tar.gz -/six-1.14.0.tar.gz -/six-1.15.0.tar.gz -/six-1.16.0.tar.gz +/six-*.tar.gz +/six-*/ diff --git a/python-six.spec b/python-six.spec index 97cdefe..9dc2413 100644 --- a/python-six.spec +++ b/python-six.spec @@ -1,32 +1,29 @@ # tests are enabled by default %bcond_without tests -%global python_wheelname six-%{version}-py2.py3-none-any.whl - Name: python-six Version: 1.16.0 Release: 1%{?dist} Summary: Python 2 and 3 compatibility utilities License: MIT -URL: https://pypi.python.org/pypi/six +URL: https://github.com/benjaminp/six Source0: %{pypi_source six} BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-pip -BuildRequires: python%{python3_pkgversion}-wheel +BuildRequires: pyproject-rpm-macros %if %{with tests} -BuildRequires: python3-pytest -BuildRequires: python3-tkinter +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-tkinter %endif %global _description %{expand: -%{name} provides simple utilities for wrapping over differences between -Python 2 and Python 3.} +Six is a Python 2 and 3 compatibility library. It provides utility functions +for smoothing over the differences between the Python versions with the goal +of writing Python code that is compatible on both Python versions.} %description %{_description} @@ -41,24 +38,28 @@ Summary: %{summary} %autosetup -p1 -n six-%{version} +%generate_buildrequires +%pyproject_buildrequires -r + + %build -%py3_build_wheel +%pyproject_wheel %install -%py3_install_wheel %{python_wheelname} +%pyproject_install +%pyproject_save_files six + %if %{with tests} %check -%pytest -rfsxX test_six.py +%pytest %endif -%files -n python%{python3_pkgversion}-six +%files -n python%{python3_pkgversion}-six -f %{pyproject_files} %license LICENSE %doc README.rst documentation/index.rst -%{python3_sitelib}/six-*.dist-info/ -%pycached %{python3_sitelib}/six.py %changelog