Port to pyproject-rpm-macros
This commit is contained in:
		
							parent
							
								
									04c185dbc0
								
							
						
					
					
						commit
						18174a33e0
					
				| @ -1,18 +1,9 @@ | |||||||
| %global srcname pyrsistent | %global srcname pyrsistent | ||||||
| 
 | 
 | ||||||
| %global common_description %{expand: |  | ||||||
| Pyrsistent is a number of persistent collections (by some referred to as |  | ||||||
| functional data structures). Persistent in the sense that they are |  | ||||||
| immutable. |  | ||||||
| 
 |  | ||||||
| All methods on a data structure that would normally mutate it instead |  | ||||||
| return a new copy of the structure containing the requested updates. The |  | ||||||
| original structure is left untouched.} |  | ||||||
| 
 |  | ||||||
| Name:           python-%{srcname} | Name:           python-%{srcname} | ||||||
| Summary:        Persistent/Functional/Immutable data structures | Summary:        Persistent/Functional/Immutable data structures | ||||||
| Version:        0.17.3 | Version:        0.17.3 | ||||||
| Release:        7%{?dist} | Release:        8%{?dist} | ||||||
| 
 | 
 | ||||||
| # The entire source is MIT, except pyrsistent/_toolz.py which is BSD. | # The entire source is MIT, except pyrsistent/_toolz.py which is BSD. | ||||||
| License:        MIT and BSD | License:        MIT and BSD | ||||||
| @ -22,10 +13,19 @@ Source0:        %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz | |||||||
| # Relax dependencies specified in setup.py (allow newer pytest/hypothesis) | # Relax dependencies specified in setup.py (allow newer pytest/hypothesis) | ||||||
| Patch0:         00-relax-dependencies.patch | Patch0:         00-relax-dependencies.patch | ||||||
| 
 | 
 | ||||||
| BuildRequires:  gcc |  | ||||||
| BuildRequires:  python3-devel | BuildRequires:  python3-devel | ||||||
|  | BuildRequires:  pyproject-rpm-macros | ||||||
|  | 
 | ||||||
|  | BuildRequires:  gcc | ||||||
|  | 
 | ||||||
|  | # For Sphinx documentation | ||||||
| BuildRequires:  make | BuildRequires:  make | ||||||
| 
 | 
 | ||||||
|  | # We need manual BR’s since they are generally not available where | ||||||
|  | # %%pyproject_buildrequires can access them, i.e., outside requirements.txt, | ||||||
|  | # and even in requirements.txt a number of packages are not actually required | ||||||
|  | # for the RPM build. | ||||||
|  | 
 | ||||||
| # ============================================================================ | # ============================================================================ | ||||||
| # From requirements.txt: | # From requirements.txt: | ||||||
| 
 | 
 | ||||||
| @ -57,8 +57,10 @@ BuildRequires:  python3dist(sphinx-rtd-theme) | |||||||
| # ---------------------------------------------------------------------------- | # ---------------------------------------------------------------------------- | ||||||
| # tox | # tox | ||||||
| 
 | 
 | ||||||
|  | # ---------------------------------------------------------------------------- | ||||||
|  | # We do not need this, since it is implied by pyproject-rpm-macros. | ||||||
|  | # ---------------------------------------------------------------------------- | ||||||
| # setuptools>=0.16.1 | # setuptools>=0.16.1 | ||||||
| BuildRequires:  python3dist(setuptools) >= 0.16.1 |  | ||||||
| 
 | 
 | ||||||
| # ---------------------------------------------------------------------------- | # ---------------------------------------------------------------------------- | ||||||
| # We do not need these for the RPM build either. | # We do not need these for the RPM build either. | ||||||
| @ -73,9 +75,22 @@ BuildRequires:  python3dist(pytest-runner) | |||||||
| # Note that pyrsistent/_toolz.py contains a bit of code ported from toolz, but | # Note that pyrsistent/_toolz.py contains a bit of code ported from toolz, but | ||||||
| # not enough to constitute a bundled dependency. | # not enough to constitute a bundled dependency. | ||||||
| 
 | 
 | ||||||
|  | %global common_description %{expand: | ||||||
|  | Pyrsistent is a number of persistent collections (by some referred to as | ||||||
|  | functional data structures). Persistent in the sense that they are | ||||||
|  | immutable. | ||||||
|  | 
 | ||||||
|  | All methods on a data structure that would normally mutate it instead | ||||||
|  | return a new copy of the structure containing the requested updates. The | ||||||
|  | original structure is left untouched.} | ||||||
|  | 
 | ||||||
| %description %{common_description} | %description %{common_description} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | %generate_buildrequires | ||||||
|  | %pyproject_buildrequires -r | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| %package -n     python3-%{srcname} | %package -n     python3-%{srcname} | ||||||
| Summary:        %{summary} | Summary:        %{summary} | ||||||
| 
 | 
 | ||||||
| @ -95,7 +110,7 @@ BuildArch:      noarch | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| %py3_build | %pyproject_wheel | ||||||
| 
 | 
 | ||||||
| # Default SPHINXOPTS are '-W -n', but -W turns warnings into errors and there | # Default SPHINXOPTS are '-W -n', but -W turns warnings into errors and there | ||||||
| # are some warnings. We want to build the documentation as best we can anyway. | # are some warnings. We want to build the documentation as best we can anyway. | ||||||
| @ -105,7 +120,8 @@ rm -f docs/build/html/.buildinfo | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %install | %install | ||||||
| %py3_install | %pyproject_install | ||||||
|  | %pyproject_save_files %{srcname} _%{srcname}_version pvectorc | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %check | %check | ||||||
| @ -114,15 +130,9 @@ rm -f docs/build/html/.buildinfo | |||||||
| env PYTHONHASHSEED=0 %pytest --doctest-modules %{srcname} | env PYTHONHASHSEED=0 %pytest --doctest-modules %{srcname} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %files -n python3-%{srcname} | %files -n python3-%{srcname} -f %{pyproject_files} | ||||||
| %license LICENCE.mit | %license LICENCE.mit | ||||||
| 
 | 
 | ||||||
| %pycached %{python3_sitearch}/_pyrsistent_version.py |  | ||||||
| 
 |  | ||||||
| %{python3_sitearch}/%{srcname}/ |  | ||||||
| %{python3_sitearch}/pvectorc.cpython-3*.so |  | ||||||
| %{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info/ |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| %files doc | %files doc | ||||||
| %license LICENCE.mit | %license LICENCE.mit | ||||||
| @ -132,6 +142,9 @@ env PYTHONHASHSEED=0 %pytest --doctest-modules %{srcname} | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Mon Jun 14 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.17.3-8 | ||||||
|  | - Port to pyproject-rpm-macros | ||||||
|  | 
 | ||||||
| * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.17.3-7 | * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.17.3-7 | ||||||
| - Rebuilt for Python 3.10 | - Rebuilt for Python 3.10 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user