2017-05-15 14:06:24 +00:00
|
|
|
# This package is part of the Python 3 bootstrapping sequence.
|
|
|
|
#
|
|
|
|
# The python3-devel subpackage has a runtime dependency on this package.
|
|
|
|
# Therefore it needs to be built before Python 3 itself. To facilitate this,
|
|
|
|
# this package has a bootstrapping mode—triggered by the macro below—that skips
|
|
|
|
# bytecompilation and therefore no Python is actually needed for building of
|
|
|
|
# this package. After Python 3 is built, this package can be rebuilt in
|
|
|
|
# normal mode again.
|
|
|
|
#
|
|
|
|
# Note, however, that even the bootstrapping version of this package is fully
|
|
|
|
# functional as Python will simply bytecompile the Python files when they are
|
|
|
|
# run. There will be a warning that the bytecompiled file cannot be saved
|
|
|
|
# (unless Python is run with root privileges), but the script will work.
|
|
|
|
#
|
|
|
|
# More info on the Python 3 bootstrapping sequence in the `python3` spec file.
|
|
|
|
#
|
2017-09-21 13:25:57 +00:00
|
|
|
%bcond_with bootstrap
|
2017-05-15 14:06:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Disable automatic (Python 2) bytecompilation in %%__os_install_post.
|
|
|
|
# When not in bootstrapping mode, the scripts are bytecompiled
|
|
|
|
# in the %%install section.
|
|
|
|
%undefine py_auto_byte_compile
|
|
|
|
|
|
|
|
%global srcname rpm
|
|
|
|
|
|
|
|
# These macros are copied from the `rpm` package so it's trivial to keep
|
|
|
|
# the two packages on the same upstream version.
|
2017-09-18 14:54:18 +00:00
|
|
|
%global rpmver 4.14.0
|
2017-10-20 09:52:42 +00:00
|
|
|
#global snapver rc2
|
2017-09-21 13:25:57 +00:00
|
|
|
%global rel 2
|
2017-10-20 09:52:42 +00:00
|
|
|
|
2017-05-15 14:06:24 +00:00
|
|
|
%global srcver %{version}%{?snapver:-%{snapver}}
|
|
|
|
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{version} | cut -d'.' -f1-2).x}
|
|
|
|
|
|
|
|
Name: python-rpm-generators
|
|
|
|
Summary: Requires and Provides generators for Python RPMs
|
|
|
|
Version: %{rpmver}
|
2017-10-20 09:52:42 +00:00
|
|
|
Release: %{?snapver:0.%{snapver}.}%{rel}%{?dist}
|
2017-05-15 14:06:24 +00:00
|
|
|
License: GPLv2+
|
|
|
|
Url: http://www.rpm.org/
|
|
|
|
Source0: http://ftp.rpm.org/releases/%{srcdir}/%{srcname}-%{srcver}.tar.bz2
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2017-09-21 13:25:57 +00:00
|
|
|
%if %{without bootstrap}
|
2017-05-15 14:06:24 +00:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
%endif
|
|
|
|
|
2017-09-18 14:54:18 +00:00
|
|
|
# Enable rich Provides generator (pythondistdeps.py instead of pythondeps.sh)
|
|
|
|
# Downstream only
|
|
|
|
Patch1: rpm-4.13.x-pythondistdeps-fileattr.patch
|
2017-05-15 14:06:24 +00:00
|
|
|
# Switch the shebang of pythondistdeps.py to Python 3
|
|
|
|
# Downstream only: https://github.com/rpm-software-management/rpm/pull/212
|
2017-09-18 14:54:18 +00:00
|
|
|
Patch2: rpm-4.13.x-pythondistdeps-python3.patch
|
|
|
|
|
|
|
|
# Handle Platform-Python implemented as a separate Python stack
|
|
|
|
# https://fedoraproject.org/wiki/Changes/Platform_Python_Stack
|
|
|
|
Patch3: rpm-4.13.x-pythondeps-platform-python-abi.patch
|
|
|
|
Patch4: rpm-4.13.x-pythondistdeps.py-platform-python.patch
|
2017-05-15 14:06:24 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides scripts that analyse Python binary RPM packages
|
|
|
|
and add appropriate Provides and Requires tags to them.
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-rpm-generators
|
|
|
|
Summary: %{summary}
|
|
|
|
Requires: python3-setuptools
|
2017-05-18 09:07:51 +00:00
|
|
|
# We're installing files into rpm's directories, therefore we're requiring it
|
|
|
|
# to be installed so the directories are created.
|
|
|
|
Requires: rpm
|
2017-05-15 14:36:26 +00:00
|
|
|
# Conflicts with older versions of `rpm-build` because it copies several files
|
|
|
|
# to the same locations which is ok only when they have the same contents.
|
|
|
|
Conflicts: rpm-build < 4.13.0.1-2
|
2017-05-15 14:06:24 +00:00
|
|
|
%{?python_provide:%python_provide python3-rpm-generators}
|
|
|
|
|
|
|
|
%description -n python3-rpm-generators
|
|
|
|
This package provides scripts that analyse Python binary RPM packages
|
|
|
|
and add appropriate Provides and Requires tags to them.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{srcname}-%{srcver} -p1
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
2017-09-21 13:25:57 +00:00
|
|
|
%if %{without bootstrap}
|
2017-05-15 14:06:24 +00:00
|
|
|
%{__python3} -m compileall scripts/
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -Dm 644 fileattrs/python.attr -t %{buildroot}/%{_fileattrsdir}
|
|
|
|
install -Dm 755 scripts/pythondeps.sh \
|
|
|
|
scripts/pythondistdeps.py \
|
|
|
|
-t %{buildroot}/%{_rpmconfigdir}
|
|
|
|
|
2017-09-21 13:25:57 +00:00
|
|
|
%if %{without bootstrap}
|
2017-05-15 14:06:24 +00:00
|
|
|
install -Dm 755 scripts/__pycache__/* \
|
|
|
|
-t %{buildroot}/%{_rpmconfigdir}/__pycache__
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-rpm-generators
|
2017-05-18 09:07:51 +00:00
|
|
|
%license COPYING
|
2017-05-15 14:06:24 +00:00
|
|
|
%{_fileattrsdir}/python.attr
|
|
|
|
%{_rpmconfigdir}/pythondeps.sh
|
|
|
|
%{_rpmconfigdir}/pythondistdeps.py
|
|
|
|
|
2017-09-21 13:25:57 +00:00
|
|
|
%if %{without bootstrap}
|
2017-05-18 09:07:51 +00:00
|
|
|
%{_rpmconfigdir}/__pycache__
|
2017-05-15 14:06:24 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2017-09-21 13:25:57 +00:00
|
|
|
* Tue Nov 28 2017 Tomas Orsava <torsava@redhat.com> - 4.14.0-2
|
|
|
|
- Switch bootsrapping macro to a bcond for modularity
|
|
|
|
|
2017-10-20 09:52:42 +00:00
|
|
|
* Fri Oct 20 2017 Tomas Orsava <torsava@redhat.com> - 4.14.0-1
|
|
|
|
- Rebase to rpm 4.14.0 final (http://rpm.org/wiki/Releases/4.14.0)
|
|
|
|
- Re-synchronize version/release macros with the rpm Fedora package
|
|
|
|
|
2017-09-18 14:54:18 +00:00
|
|
|
* Mon Sep 18 2017 Tomas Orsava <torsava@redhat.com> - 4.14.0-0.rc1.1
|
|
|
|
- Update to a new upstream version of RPM
|
|
|
|
- Drop upstreamed patches
|
|
|
|
- Renumber remaining patches
|
|
|
|
|
2017-08-24 11:50:13 +00:00
|
|
|
* Thu Aug 24 2017 Miro Hrončok <mhroncok@redhat.com> - 4.13.0.1-4
|
|
|
|
- Add patch 10: Do not provide pythonXdist for platform-python packages (rhbz#1484607)
|
|
|
|
|
2017-08-14 13:39:58 +00:00
|
|
|
* Tue Aug 08 2017 Tomas Orsava <torsava@redhat.com> - 4.13.0.1-3
|
|
|
|
- Add patch 9: Generate requires and provides for platform-python(abi)
|
|
|
|
(https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
|
|
|
|
|
2017-07-27 11:44:11 +00:00
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0.1-2.1
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
2017-05-18 09:07:51 +00:00
|
|
|
* Thu May 18 2017 Tomas Orsava <torsava@redhat.com> - 4.13.0.1-2
|
|
|
|
- Added a license file
|
|
|
|
- Added a dependency on rpm for the proper directory structure
|
|
|
|
- Properly owning the __pycache__ directory
|
|
|
|
|
2017-05-15 14:06:24 +00:00
|
|
|
* Tue May 02 2017 Tomas Orsava <torsava@redhat.com> - 4.13.0.1-1
|
|
|
|
- Splitting Python RPM generators from the `rpm` package to standalone one
|