]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- fix building python bindings (force librarries from build tree)
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 31 Dec 2019 17:05:39 +0000 (02:05 +0900)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 31 Dec 2019 17:05:39 +0000 (02:05 +0900)
python-internal-build.patch [new file with mode: 0644]
rpm.spec

diff --git a/python-internal-build.patch b/python-internal-build.patch
new file mode 100644 (file)
index 0000000..b339769
--- /dev/null
@@ -0,0 +1,35 @@
+--- rpm-4.15.1/python/setup.py.in.orig 2019-06-26 23:17:31.000000000 +0900
++++ rpm-4.15.1/python/setup.py.in      2020-01-01 01:58:28.121517896 +0900
+@@ -12,17 +12,8 @@
+         out.append(token[2:])
+     return out
+-cflags = ['-std=c99', '-Wno-strict-aliasing']
+-additional_link_args = []
+-
+-# See if we're building in-tree
+-if os.access('Makefile.am', os.F_OK):
+-    cflags.append('-I../include')
+-    additional_link_args.extend(['-Wl,-L../rpmio/.libs',
+-                                 '-Wl,-L../lib/.libs',
+-                                 '-Wl,-L../build/.libs',
+-                                 '-Wl,-L../sign/.libs'])
+-    os.environ['PKG_CONFIG_PATH'] = '..'
++cflags = ['-std=c99', '-Wno-strict-aliasing', '-I../include']
++os.environ['PKG_CONFIG_PATH'] = '..'
+ rpmmod = Extension('rpm._rpm',
+                    sources = ['header-py.c', 'rpmds-py.c', 'rpmfd-py.c',
+@@ -33,11 +24,9 @@
+                               'rpmte-py.c', 'rpmts-py.c',
+                               'spec-py.c',
+                               'rpmmodule.c'],
+-                   include_dirs = pkgconfig('--cflags'),
+-                   library_dirs = pkgconfig('--libs-only-L'),
++                   library_dirs = ['../rpmio/.libs', '../lib/.libs', '../build/.libs', '../sign/.libs'],
+                    libraries = pkgconfig('--libs-only-l') + ['rpmbuild', 'rpmsign'],
+                    extra_compile_args = cflags,
+-                   extra_link_args = additional_link_args
+                   )
+ setup(name='@PACKAGE_NAME@',
index 2afcb8610dc133b16b55c119448ddff6bd0e2638..c7cdbef7b669ebe862b7a5c464fb0c804ad1d196 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -1,6 +1,5 @@
 #
 # TODO:
-# - build python stuff with libs from build tree
 # - rebuild database after upgrading from rpm5
 # - when adopting, use 4.5 ticket for checklist: https://bugs.launchpad.net/pld-linux/+bug/262985
 #
@@ -94,6 +93,7 @@ Patch17:      x32.patch
 Patch18:       %{name}-fix-compress-doc.patch
 Patch19:       vendor-pld.patch
 Patch20:       rpm5-db-compat.patch
+Patch21:       python-internal-build.patch
 URL:           https://rpm.org/
 BuildRequires: %{reqdb_pkg}-devel >= %{reqdb_pkgver}
 BuildRequires: %{reqdb_pkg}-sql-devel >= %{reqdb_pkgver}
@@ -663,6 +663,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 #%patch18 -p1
 #%patch19 -p1
 %patch20 -p1
+%patch21 -p1
 
 install %{SOURCE2} pld.in
 install %{SOURCE8} scripts/php.prov.in
This page took 0.055059 seconds and 4 git commands to generate.