public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - add python3 sub-package, based on patch by Bohuslav Kabrda
Date: Mon, 23 Nov 2026 09:28:26 GMT [thread overview]
Message-ID: <179542610634.1.3629771977515548164.rpms-rpm-f5c5c333a876@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : f5c5c333a876310619f37340a8c621e5a27d73a1
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2013-08-21T13:39:02+03:00
Stats : +104/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/f5c5c333a876310619f37340a8c621e5a27d73a1?branch=pmatilai-v6
Log:
- add python3 sub-package, based on patch by Bohuslav Kabrda
---
diff --git a/rpm-4.11.0.1-setuppy-fixes.patch b/rpm-4.11.0.1-setuppy-fixes.patch
new file mode 100644
index 0000000..2349ab0
--- /dev/null
+++ b/rpm-4.11.0.1-setuppy-fixes.patch
@@ -0,0 +1,61 @@
+--- rpm-4.11.0.1/python/setup.py.in.setuppy-fixes 2012-11-07 13:55:24.000000000 +0100
++++ rpm-4.11.0.1/python/setup.py.in 2013-04-03 14:16:48.149931703 +0200
+@@ -1,13 +1,19 @@
+ #!/usr/bin/env python
+
+ from distutils.core import setup, Extension
++import os
+ import subprocess
+ from glob import glob
+
+ def pkgconfig(what):
+ out = []
+ cmd = 'pkg-config %s %s' % (what, '@PACKAGE_NAME@')
+- pcout = subprocess.check_output(cmd.split()).decode()
++ env = dict(os.environ, **{'PKG_CONFIG_PATH': '..'})
++ proc = subprocess.Popen(cmd.split(),
++ stdout=subprocess.PIPE,
++ stderr=subprocess.PIPE,
++ env=env)
++ pcout = proc.communicate()[0].decode()
+ for token in pcout.split():
+ out.append(token[2:])
+ return out
+@@ -18,7 +24,8 @@
+ srcs.extend(glob('%s*.c' % n))
+ return srcs
+
+-cflags = ['-std=c99']
++cflags = ['-std=c99', '-I../include']
++additional_link_args = ['-Wl,-L../rpmio/.libs', '-Wl,-L../lib/.libs', '-Wl,-L../build/.libs', '-Wl,-L../sign/.libs']
+
+ rpmmod = Extension('rpm._rpm',
+ sources = mksources([
+@@ -28,21 +35,24 @@
+ ]),
+ include_dirs = pkgconfig('--cflags'),
+ libraries = pkgconfig('--libs'),
+- extra_compile_args = cflags
++ extra_compile_args = cflags,
++ extra_link_args = additional_link_args
+ )
+
+ rpmbuild_mod = Extension('rpm._rpmb',
+ sources = mksources(['rpmbmodule', 'spec']),
+ include_dirs = pkgconfig('--cflags'),
+ libraries = pkgconfig('--libs') + ['rpmbuild'],
+- extra_compile_args = cflags
++ extra_compile_args = cflags,
++ extra_link_args = additional_link_args
+ )
+
+ rpmsign_mod = Extension('rpm._rpms',
+ sources = mksources(['rpmbmodule']),
+ include_dirs = pkgconfig('--cflags'),
+ libraries = pkgconfig('--libs') + ['rpmsign'],
+- extra_compile_args = cflags
++ extra_compile_args = cflags,
++ extra_link_args = additional_link_args
+ )
+
+ setup(name='@PACKAGE_NAME@-python',
diff --git a/rpm.spec b/rpm.spec
index 408b89a..1fd9007 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}5%{?dist}.1
+Release: %{?snapver:0.%{snapver}.}6%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -62,6 +62,8 @@ Patch305: rpm-4.10.0-dwz-debuginfo.patch
Patch306: rpm-4.10.0-minidebuginfo.patch
# Fix CRC32 after dwz (#971119)
Patch307: rpm-4.11.1-sepdebugcrcfix.patch
+# To be upstreamed in slightly different form
+Patch308: rpm-4.11.0.1-setuppy-fixes.patch
# Temporary Patch to provide support for updates
Patch400: rpm-4.10.90-rpmlib-filesystem-check.patch
@@ -104,6 +106,7 @@ BuildRequires: libsemanage-devel%{_isa}
BuildRequires: ncurses-devel%{_isa}
BuildRequires: bzip2-devel%{_isa} >= 0.9.0c-2
BuildRequires: python-devel%{_isa} >= 2.6
+BuildRequires: python3-devel%{_isa} >= 3.2
BuildRequires: lua-devel%{_isa} >= 5.1
BuildRequires: libcap-devel%{_isa}
BuildRequires: libacl-devel%{_isa}
@@ -194,7 +197,7 @@ Requires: rpm-build-libs%{_isa} = %{version}-%{release}
This package contains support for digitally signing RPM packages.
%package python
-Summary: Python bindings for apps which will manipulate RPM packages
+Summary: Python 2 bindings for apps which will manipulate RPM packages
Group: Development/Libraries
Requires: rpm = %{version}-%{release}
@@ -203,7 +206,20 @@ The rpm-python package contains a module that permits applications
written in the Python programming language to use the interface
supplied by RPM Package Manager libraries.
-This package should be installed if you want to develop Python
+This package should be installed if you want to develop Python 2
+programs that will manipulate RPM packages and databases.
+
+%package python3
+Summary: Python 3 bindings for apps which will manipulate RPM packages
+Group: Development/Libraries
+Requires: rpm = %{version}-%{release}
+
+%description python3
+The rpm-python3 package contains a module that permits applications
+written in the Python programming language to use the interface
+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.
%package apidocs
@@ -242,6 +258,7 @@ packages on a system.
%patch305 -p1 -b .dwz-debuginfo
%patch306 -p1 -b .minidebuginfo
%patch307 -p1 -b .sepdebugcrcfix
+%patch308 -p1 -b .setuppy-fixes
%patch400 -p1 -b .rpmlib-filesystem-check
@@ -285,11 +302,25 @@ export CPPFLAGS CFLAGS LDFLAGS
make %{?_smp_mflags}
+pushd python
+%{__python} setup.py build
+%{__python3} setup.py build
+popd
+
%install
rm -rf $RPM_BUILD_ROOT
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)
+rm -rf $RPM_BUILD_ROOT/%{python_sitearch}
+pushd python
+%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
+popd
+
+
# Save list of packages through cron
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm
@@ -451,6 +482,12 @@ exit 0
%files python
%defattr(-,root,root)
%{python_sitearch}/rpm
+%{python_sitearch}/rpm_python-%{version}-py2.7.egg-info
+
+%files python3
+%defattr(-,root,root)
+%{python3_sitearch}/rpm
+%{python3_sitearch}/rpm_python-%{version}-py%{python3_version}.egg-info
%files devel
%defattr(-,root,root)
@@ -470,6 +507,9 @@ exit 0
%doc COPYING doc/librpm/html/*
%changelog
+* Wed Aug 21 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.1-6
+- add python3 sub-package, based on patch by Bohuslav Kabrda
+
* Sat Aug 03 2013 Petr Pisar <ppisar@redhat.com> - 4.11.1-5.1
- Perl 5.18 rebuild
reply other threads:[~2026-11-23 9:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542610634.1.3629771977515548164.rpms-rpm-f5c5c333a876@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox