import python-rpm-macros-3-43.el8
This commit is contained in:
		
							parent
							
								
									485248244c
								
							
						
					
					
						commit
						d91b94b69f
					
				| @ -41,10 +41,28 @@ | ||||
|         end\ | ||||
| } | ||||
| 
 | ||||
| # RHEL 9+ and Fedora compatibility macro | ||||
| # Only use in macro backports, not intended to be used in spec files! | ||||
| # In the future, the %%python3_pkgversion macro has a dot, e.g. 3.9 or 3.11 | ||||
| # However, in RHEL 8 at least, it does not, e.g. 38, 39 | ||||
| # This is a helpful macro that determines the proper "Python version" string with dot | ||||
| # from %%python3_pkgversion without actually having Python installed. | ||||
| # For values other than 3X, it should expand to %%python3_pkgversion unchanged. | ||||
| # Examples of %%python3_pkgversion -> %%_python3_pkgversion_with_dot: | ||||
| #   3    -> 3 | ||||
| #   38   -> 3.8 | ||||
| #   39   -> 3.9 | ||||
| #   310  -> 3.10 | ||||
| #   3.12 -> 3.12 | ||||
| #   4    -> 4 | ||||
| #   412  -> 412 | ||||
| %_python3_pkgversion_with_dot %{lua:print((rpm.expand("%python3_pkgversion"):gsub('^3(%d)', '3.%1')))} | ||||
| 
 | ||||
| # Creates Python 3 dist tag(s) after converting names to canonical format | ||||
| #   Needs to first put all arguments into a list, because invoking a different | ||||
| #   macro (%py_dist_name) overwrites them | ||||
| %py3_dist() %{lua:\ | ||||
|         python3_pkgversion_with_dot = rpm.expand("%_python3_pkgversion_with_dot")\ | ||||
|         args = {}\ | ||||
|         arg = 1\ | ||||
|         while (true) do\ | ||||
| @ -57,7 +75,7 @@ | ||||
|         end\ | ||||
|         for arg, name in ipairs(args) do\ | ||||
|                 canonical = rpm.expand("%py_dist_name " .. name);\ | ||||
|                 print("python3dist(" .. canonical .. ") ");\ | ||||
|                 print("python" .. python3_pkgversion_with_dot .. "dist(" .. canonical .. ") ");\ | ||||
|         end\ | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -76,7 +76,7 @@ | ||||
| } | ||||
| 
 | ||||
| # This is intended for Python 3 only, hence also no Python version in the name. | ||||
| %__pytest /usr/bin/pytest-3 | ||||
| %__pytest /usr/bin/pytest-%{_python3_pkgversion_with_dot} | ||||
| %pytest %{expand:\\\ | ||||
|   CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ | ||||
|   PATH="%{buildroot}%{_bindir}:$PATH"\\\ | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| Name:           python-rpm-macros | ||||
| Version:        3 | ||||
| Release:        41%{?dist} | ||||
| Release:        43%{?dist} | ||||
| Summary:        The unversioned Python RPM macros | ||||
| 
 | ||||
| License:        MIT | ||||
| @ -43,6 +43,8 @@ Summary:        RPM macros for building Python 3 packages | ||||
| Conflicts:      platform-python-devel < 3.6.8-35 | ||||
| # For %%py_setup | ||||
| Requires:       python-rpm-macros = %{version}-%{release} | ||||
| # For %%_python3_pkgversion_with_dot needed by %%__pytest | ||||
| Requires:       python-srpm-macros = %{version}-%{release} | ||||
| 
 | ||||
| %description -n python3-rpm-macros | ||||
| RPM macros for building Python 3 packages. | ||||
| @ -73,6 +75,14 @@ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \ | ||||
| 
 | ||||
| 
 | ||||
| %changelog | ||||
| * Tue Jul 26 2022 Tomas Orsava <torsava@redhat.com> - 3-43 | ||||
| - Make %%pytest macro respect %%python3_pkgversion | ||||
| Resolves: rhbz#2091462 | ||||
| 
 | ||||
| * Wed May 25 2022 Miro Hrončok <mhroncok@redhat.com> - 3-42 | ||||
| - Make %%py3_dist respect %%python3_pkgversion | ||||
| Resolves: rhbz#2090007 | ||||
| 
 | ||||
| * Mon Feb 01 2021 Lumír Balhar <lbalhar@redhat.com> - 3-41 | ||||
| - Fix dependencies between subpackages | ||||
| Resolves: rhbz#1892797 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user