From 2c8989bc46dd014e78d9efbce31ff25738323e97 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Aug 31 2022 11:24:51 +0000 Subject: Convert to %pyproject macros --- diff --git a/python-appdirs.spec b/python-appdirs.spec index ecd50df..89d2435 100644 --- a/python-appdirs.spec +++ b/python-appdirs.spec @@ -1,6 +1,3 @@ -%bcond_without wheel -%global wheelname appdirs-%{version}-py2.py3-none-any.whl - Name: python-appdirs Version: 1.4.4 Release: 7%{?dist} @@ -12,50 +9,48 @@ Source: %{pypi_source appdirs} BuildArch: noarch +BuildRequires: python3-devel + %description A small Python module for determining appropriate " + " platform-specific directories, e.g. a "user data dir". + %package -n python3-appdirs Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%if %{with wheel} -BuildRequires: python3-pip -BuildRequires: python3-wheel -%endif %description -n python3-appdirs A small Python 3 module for determining appropriate " + " platform-specific directories, e.g. a "user data dir". + %prep %autosetup -n appdirs-%{version} sed -i -e '1{\@^#!/usr/bin/env python@d}' appdirs.py -rm -vrf appdirs.egg-info + + +%generate_buildrequires +%pyproject_buildrequires + %build -%if %{with wheel} - %py3_build_wheel -%else - %py3_build -%endif +%pyproject_wheel + %install -%if %{with wheel} - %py3_install_wheel %{wheelname} -%else - %py3_install -%endif +%pyproject_install +%pyproject_save_files appdirs + %check -%{__python3} setup.py test +# upstream's tox.ini just wraps this command with no extra deps +# we don't use %%tox here to avoid a dependency loop: tox->platformdirs->appdirs +%{python3} setup.py test -%files -n python3-appdirs -%license LICENSE.txt + +%files -n python3-appdirs -f %{pyproject_files} %doc README.rst CHANGES.rst -%{python3_sitelib}/appdirs* -%{python3_sitelib}/__pycache__/appdirs.* + %changelog * Fri Jul 22 2022 Fedora Release Engineering - 1.4.4-7