Convert the SPEC to pyproject macros
This commit is contained in:
		
							parent
							
								
									5edf3c3fa7
								
							
						
					
					
						commit
						f8479daf3b
					
				| @ -28,7 +28,6 @@ Patch:         Ensure-Python-3.7-compatibility-in-check_console_script.patch | ||||
| Patch:         Ensure-Python-3.12-compatibility-in-check_console_script.patch | ||||
| 
 | ||||
| BuildRequires: python3-devel | ||||
| BuildRequires: python3-setuptools | ||||
| 
 | ||||
| %if %{with check} | ||||
| BuildRequires: tcsh | ||||
| @ -70,11 +69,16 @@ sed -i -r -e '/tests_require = /s/"(coverage|flake8|wheel)"[, ]*//g' setup.py | ||||
| sed -i -e "1s|#!.*python.*|#!%{__python3}|" test/prog scripts/* | ||||
| sed -i -e "s|python |python3 |" test/test.py | ||||
| 
 | ||||
| %generate_buildrequires | ||||
| %pyproject_buildrequires %{?with_check:-x test} | ||||
| 
 | ||||
| %build | ||||
| %py3_build | ||||
| %pyproject_wheel | ||||
| 
 | ||||
| %install | ||||
| %py3_install | ||||
| %pyproject_install | ||||
| %pyproject_save_files argcomplete | ||||
| 
 | ||||
| 
 | ||||
| # do not attempt to install to %%bash_completions_dir, see https://bugzilla.redhat.com/2211862 | ||||
| install -Dp -m0644 argcomplete/bash_completion.d/%{name} %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} | ||||
| @ -89,11 +93,9 @@ export INPUTRC=$PWD/.inputrc | ||||
| %{python3} setup.py test | ||||
| %endif | ||||
| 
 | ||||
| %files -n python3-argcomplete | ||||
| %files -n python3-argcomplete -f %{pyproject_files} | ||||
| %license LICENSE.rst | ||||
| %doc README.rst | ||||
| %{python3_sitelib}/argcomplete-*.egg-info/ | ||||
| %{python3_sitelib}/argcomplete/ | ||||
| %{_bindir}/activate-global-python-argcomplete | ||||
| %{_bindir}/python-argcomplete-check-easy-install-script | ||||
| %{_bindir}/python-argcomplete-tcsh | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user