public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Remove platform-python bits
@ 2026-11-23 9:31 Igor Gnatenko
0 siblings, 0 replies; only message in thread
From: Igor Gnatenko @ 2026-11-23 9:31 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : e6d364fc15b5159789d620b1ccaa37ab48024d10
Author : Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Date : 2017-11-06T15:04:31+01:00
Stats : +5/-206 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/e6d364fc15b5159789d620b1ccaa37ab48024d10?branch=pmatilai-v6
Log:
Remove platform-python bits
Platform Python didn't prove to work.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
---
diff --git a/platform-python-abi.patch b/platform-python-abi.patch
deleted file mode 100644
index ba4f757..0000000
--- a/platform-python-abi.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From fef3b646f3facd26dc04cfccdc27c061cfe0ee37 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
-Date: Mon, 7 Aug 2017 16:28:59 +0200
-Subject: [PATCH] Generate requires and provides for platform-python(abi)
-
-See https://fedoraproject.org/wiki/Changes/Platform_Python_Stack
----
- scripts/pythondeps.sh | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/scripts/pythondeps.sh b/scripts/pythondeps.sh
-index 10a060aac..a6d97ef4f 100755
---- a/scripts/pythondeps.sh
-+++ b/scripts/pythondeps.sh
-@@ -13,8 +13,8 @@ case $1 in
- # generating a line of the form
- # python(abi) = MAJOR.MINOR
- # (Don't match against -config tools e.g. /usr/bin/python2.6-config)
-- grep "/usr/bin/python.\..$" \
-- | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
-+ egrep '/usr/(bin/|libexec/platform-)python.\..$' \
-+ | sed -r -e "s@.*/usr/(bin/|libexec/(platform-))python(.\..)@\2python(abi) = \3@"
- ;;
- -R|--requires)
- shift
-@@ -23,8 +23,8 @@ case $1 in
- # /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
- # generating (uniqely) lines of the form:
- # python(abi) = MAJOR.MINOR
-- grep "/usr/lib[^/]*/python.\../.*" \
-- | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
-+ egrep '/usr/lib[^/]*/(platform-|)python.\../.*' \
-+ | sed -r -e "s@.*/usr/lib[^/]*/(platform-|)python(.\..)/.*@\1python(abi) = \2@g" \
- | sort | uniq
- ;;
- esac
---
-2.13.3
-
diff --git a/platform-python-bytecompile.patch b/platform-python-bytecompile.patch
deleted file mode 100644
index 30483af..0000000
--- a/platform-python-bytecompile.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From cc1a08b4a5222e74cae46ee17d4ef297ed63c2a9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
-Date: Tue, 8 Aug 2017 12:27:48 +0200
-Subject: [PATCH] Bytecompile stuff in /usr/lib*/platform-python with
- platform-python
-
----
- scripts/brp-python-bytecompile | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile
-index 894fa3459..92460b982 100644
---- a/scripts/brp-python-bytecompile
-+++ b/scripts/brp-python-bytecompile
-@@ -57,9 +57,15 @@ EOF
- # and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1
-
- shopt -s nullglob
--for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/python[0-9]\.[0-9]$"`;
-+for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/(platform-)?python[0-9]\.[0-9]$"`;
- do
-- python_binary=/usr/bin/$(basename $python_libdir)
-+ python_basename=$(basename $python_libdir)
-+ if [[ $python_basename == platform* ]];
-+ then
-+ python_binary=/usr/libexec/$python_basename
-+ else
-+ python_binary=/usr/bin/$python_basename
-+ fi
- real_libdir=${python_libdir/$RPM_BUILD_ROOT/}
- echo "Bytecompiling .py files below $python_libdir using $python_binary"
-
-@@ -88,14 +94,14 @@ if [ ! -x "$default_python" ]; then
- fi
-
- # Generate normal (.pyc) byte-compiled files.
--python_bytecompile "" $default_python "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
-+python_bytecompile "" $default_python "/bin/|/sbin/|/usr/lib(64)?/(platform-)?python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
- if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
- # One or more of the files had a syntax error
- exit 1
- fi
-
- # Generate optimized (.pyo) byte-compiled files.
--python_bytecompile "-O" $default_python "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
-+python_bytecompile "-O" $default_python "/bin/|/sbin/|/usr/lib(64)?/(platform-)?python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
- if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
- # One or more of the files had a syntax error
- exit 1
---
-2.13.3
-
diff --git a/platform-python-distdeps.patch b/platform-python-distdeps.patch
deleted file mode 100644
index 8afbf3b..0000000
--- a/platform-python-distdeps.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From eb48f08dd30324f960b8e404b80eb885b2bbb593 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
-Date: Thu, 24 Aug 2017 13:45:49 +0200
-Subject: [PATCH] Do not provide pythonXdist for platform-python packages
-
----
- scripts/pythondistdeps.py | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
-index 2abb59f49..f624fdbb7 100755
---- a/scripts/pythondistdeps.py
-+++ b/scripts/pythondistdeps.py
-@@ -16,6 +16,7 @@ from os.path import basename, dirname, isdir, sep
- from sys import argv, stdin, version
- from distutils.sysconfig import get_python_lib
- from warnings import warn
-+import re
-
-
- opts, args = getopt(
-@@ -78,6 +79,9 @@ for f in files:
- f = f.strip()
- lower = f.lower()
- name = 'python(abi)'
-+ if re.search(r'/usr/lib(64)?/platform-python\d\.\d', lower):
-+ # https://bugzilla.redhat.com/show_bug.cgi?id=1484607
-+ continue
- # add dependency based on path, versioned if within versioned python directory
- if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')):
- if name not in py_deps:
-@@ -115,7 +119,6 @@ for f in files:
- if not dist.py_version:
- # Try to parse the Python version from the path the metadata
- # resides at (e.g. /usr/lib/pythonX.Y/site-packages/...)
-- import re
- res = re.search(r"/python(?P<pyver>\d+\.\d)/", path_item)
- if res:
- dist.py_version = res.group('pyver')
---
-2.13.5
-
diff --git a/rpm.spec b/rpm.spec
index 0a280c2..75caaab 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -19,19 +19,11 @@
# build with lmdb support?
%bcond_with lmdb
-# which python subpackages to build (default: all)
-# so it can be built in different modules with different subpackages
-%bcond_without python2
-%bcond_without python3
-# Note that the rpm package with Patch908 applied has to be in
-# the buildroot before platform_python enabled build happens.
-%bcond_without platform_python
-
%define rpmhome /usr/lib/rpm
%global rpmver 4.14.0
#global snapver rc2
-%global rel 3
+%global rel 4
%global srcver %{version}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -73,14 +65,6 @@ Patch906: rpm-4.7.1-geode-i686.patch
# Probably to be upstreamed in slightly different form
Patch907: rpm-4.13.90-ldflags.patch
-# Use platform-python for bytecompilation in /usr/lib*/platform-python
-Patch908: platform-python-bytecompile.patch
-
-# Those patches are currently not part of any built RPM, however, to be
-# consistent with python-rpm-generators, we are adding it anyway.
-Patch909: platform-python-abi.patch
-Patch910: platform-python-distdeps.patch
-
# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
License: GPLv2+
@@ -240,7 +224,6 @@ Requires: rpm-build-libs%{_isa} = %{version}-%{release}
%description sign
This package contains support for digitally signing RPM packages.
-%if %{with python2}
%package -n python2-%{name}
Summary: Python 2 bindings for apps which will manipulate RPM packages
Group: Development/Libraries
@@ -257,9 +240,7 @@ supplied by RPM Package Manager libraries.
This package should be installed if you want to develop Python 2
programs that will manipulate RPM packages and databases.
-%endif # with python2
-%if %{with python3}
%package -n python3-%{name}
Summary: Python 3 bindings for apps which will manipulate RPM packages
Group: Development/Libraries
@@ -268,6 +249,7 @@ BuildRequires: python3-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Provides: %{name}-python3 = %{version}-%{release}
Obsoletes: %{name}-python3 < %{version}-%{release}
+Obsoletes: platform-pyhton-%{name} < %{version}-%{release}
%description -n python3-%{name}
The python3-rpm package contains a module that permits applications
@@ -276,20 +258,6 @@ supplied by RPM Package Manager libraries.
This package should be installed if you want to develop Python 3
programs that will manipulate RPM packages and databases.
-%endif # with python3
-
-%if %{with platform_python}
-%package -n platform-python-%{name}
-Summary: Platform Python bindings for apps which will manipulate RPM packages
-Group: Development/Libraries
-BuildRequires: platform-python-devel
-Requires: %{name}-libs%{?_isa} = %{version}-%{release}
-
-%description -n platform-python-%{name}
-The platform-python-rpm package contains a module that permits applications
-written in the Python programming language to use the interface
-supplied by RPM Package Manager libraries.
-%endif # with platform_python
%package apidocs
Summary: API documentation for RPM libraries
@@ -405,31 +373,13 @@ done;
--enable-python \
--with-crypto=openssl
-
-%if %{with platform_python}
-# Copy the directory so python3 and platform_python do not share it,
-# as they may have the same version and the filenames could collide.
-# Do it before `make` to avoid having anything built in there.
-cp -a python platform_python
-%endif # with platform_python
-
make %{?_smp_mflags}
pushd python
-%if %{with python2}
%{__python2} setup.py build
-%endif # with python2
-%if %{with python3}
%{__python3} setup.py build
-%endif # with python3
popd
-%if %{with platform_python}
-pushd platform_python
-%{__platform_python} setup.py build
-popd
-%endif # with platform_python
-
%install
rm -rf $RPM_BUILD_ROOT
@@ -438,20 +388,10 @@ make DESTDIR="$RPM_BUILD_ROOT" install
# We need to build with --enable-python for the self-test suite, but we
# actually package the bindings built with setup.py (#531543#c26)
pushd python
-%if %{with python2}
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
-%endif # with python2
-%if %{with python3}
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
-%endif # with python3
popd
-%if %{with platform_python}
-pushd platform_python
-%{__platform_python} setup.py install --skip-build --root $RPM_BUILD_ROOT
-popd
-%endif # with platform_python
-
# Save list of packages through cron
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
@@ -611,24 +551,13 @@ make check || cat tests/rpmtests.log
%{_bindir}/rpmsign
%{_mandir}/man8/rpmsign.8*
-%if %{with python2}
%files -n python2-%{name}
%{python2_sitearch}/%{name}/
%{python2_sitearch}/%{name}-%{version}*.egg-info
-%endif # with python2
-
-%if %{with python3}
%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}*.egg-info
-%endif # with python3
-
-%if %{with platform_python}
-%files -n platform-python-%{name}
-%{platform_python_sitearch}/%{name}/
-%{platform_python_sitearch}/%{name}-%{version}*.egg-info
-%endif # with platform_python
%files devel
%{_mandir}/man8/rpmgraph.8*
@@ -646,6 +575,9 @@ make check || cat tests/rpmtests.log
%doc doc/librpm/html/*
%changelog
+* Mon Nov 06 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.14.0-4
+- Remove platform-python bits
+
* Thu Oct 26 2017 Panu Matilainen <pmatilai@redhat.com> - 4.14.0-3
- Move selinux plugin dependency to selinux-policy in Fedora >= 28 (#1493267)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:31 [rpms/rpm] pmatilai-v6: Remove platform-python bits Igor Gnatenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox