commit dc049f228c0bada34721099180f9dafbe446b26b
Author: Jan RÄ™korajski <[email protected]>
Date:   Wed Jan 1 02:05:39 2020 +0900

    - fix building python bindings (force librarries from build tree)

 python-internal-build.patch | 35 +++++++++++++++++++++++++++++++++++
 rpm.spec                    |  3 ++-
 2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index 2afcb86..c7cdbef 100644
--- 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
diff --git a/python-internal-build.patch b/python-internal-build.patch
new file mode 100644
index 0000000..b339769
--- /dev/null
+++ b/python-internal-build.patch
@@ -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@',
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/dc049f228c0bada34721099180f9dafbe446b26b

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to