Convert to %pyproject macros
This commit is contained in:
		
							parent
							
								
									30ffc93b05
								
							
						
					
					
						commit
						2c8989bc46
					
				| @ -1,6 +1,3 @@ | |||||||
| %bcond_without wheel |  | ||||||
| %global wheelname appdirs-%{version}-py2.py3-none-any.whl |  | ||||||
| 
 |  | ||||||
| Name:          python-appdirs | Name:          python-appdirs | ||||||
| Version:       1.4.4 | Version:       1.4.4 | ||||||
| Release:       7%{?dist} | Release:       7%{?dist} | ||||||
| @ -12,50 +9,48 @@ Source:        %{pypi_source appdirs} | |||||||
| 
 | 
 | ||||||
| BuildArch:     noarch | BuildArch:     noarch | ||||||
| 
 | 
 | ||||||
|  | BuildRequires: python3-devel | ||||||
|  | 
 | ||||||
| %description | %description | ||||||
| A small Python module for determining appropriate " + " platform-specific | A small Python module for determining appropriate " + " platform-specific | ||||||
| directories, e.g. a "user data dir". | directories, e.g. a "user data dir". | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| %package -n python3-appdirs | %package -n python3-appdirs | ||||||
| Summary:        %{summary} | Summary:        %{summary} | ||||||
| BuildRequires:  python3-devel |  | ||||||
| BuildRequires:  python3-setuptools |  | ||||||
| %if %{with wheel} |  | ||||||
| BuildRequires:  python3-pip |  | ||||||
| BuildRequires:  python3-wheel |  | ||||||
| %endif |  | ||||||
| 
 | 
 | ||||||
| %description -n python3-appdirs | %description -n python3-appdirs | ||||||
| A small Python 3 module for determining appropriate " + " platform-specific | A small Python 3 module for determining appropriate " + " platform-specific | ||||||
| directories, e.g. a "user data dir". | directories, e.g. a "user data dir". | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| %prep | %prep | ||||||
| %autosetup -n appdirs-%{version} | %autosetup -n appdirs-%{version} | ||||||
| sed -i -e '1{\@^#!/usr/bin/env python@d}' appdirs.py | sed -i -e '1{\@^#!/usr/bin/env python@d}' appdirs.py | ||||||
| rm -vrf appdirs.egg-info | 
 | ||||||
|  | 
 | ||||||
|  | %generate_buildrequires | ||||||
|  | %pyproject_buildrequires | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| %if %{with wheel} | %pyproject_wheel | ||||||
|   %py3_build_wheel | 
 | ||||||
| %else |  | ||||||
|   %py3_build |  | ||||||
| %endif |  | ||||||
| 
 | 
 | ||||||
| %install | %install | ||||||
| %if %{with wheel} | %pyproject_install | ||||||
|   %py3_install_wheel %{wheelname} | %pyproject_save_files appdirs | ||||||
| %else | 
 | ||||||
|   %py3_install |  | ||||||
| %endif |  | ||||||
| 
 | 
 | ||||||
| %check | %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 | %doc README.rst CHANGES.rst | ||||||
| %{python3_sitelib}/appdirs* | 
 | ||||||
| %{python3_sitelib}/__pycache__/appdirs.* |  | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
| * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-7 | * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-7 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user