Convert to pyproject macros, update description, URL, .gitignore...

This commit is contained in:
Miro Hrončok 2021-05-10 19:45:03 +02:00
parent 8e026ac0cd
commit c6fbfeb07d
2 changed files with 19 additions and 32 deletions

18
.gitignore vendored
View File

@ -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-*/

View File

@ -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