blob: 48cf4aee856ec4c9f44d1281882f6caccbc39dda [file] [log] [blame]
Brad Bishop37a0e4d2017-12-04 01:01:44 -05001From 2ada22f05460223924efe54080cb4419e2b4c276 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 24 Feb 2017 17:53:02 +0200
4Subject: [PATCH] Install python modules to correct library dir.
5
6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08008
9Add OE's CFLAGS which contains `-fdebug-prefix-map' options to
10setup.py
11
12Supply "--root" directory to the "install" command, and use
13it as a prefix to strip off the purported filename encoded
14in bytecode files. (It strips build path prefix from .pyc files)
15
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Brad Bishop37a0e4d2017-12-04 01:01:44 -050017---
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018 python/Makefile.am | 8 ++++++--
19 1 file changed, 6 insertions(+), 2 deletions(-)
Brad Bishop37a0e4d2017-12-04 01:01:44 -050020
21diff --git a/python/Makefile.am b/python/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022index a254480..578602f 100644
Brad Bishop37a0e4d2017-12-04 01:01:44 -050023--- a/python/Makefile.am
24+++ b/python/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025@@ -8,6 +8,10 @@ AUTOMAKE_OPTIONS = subdir-objects
26 AM_CPPFLAGS = -I$(srcdir)/../includes
27 AM_CPPFLAGS += -I$(abs_builddir)/../includes/sys
28
29+# Add OE's CFLAGS which contains `-fdebug-prefix-map' options to
30+# fix build path issue
31+AM_CPPFLAGS += $(CFLAGS)
32+
33 # Any script in the following variable will get byte-compiled at
34 # install time.
35 pkglibexecpython_PYTHON =
36@@ -47,7 +51,7 @@ install-exec-local:
Brad Bishop37a0e4d2017-12-04 01:01:44 -050037 if HAVE_PYTHON2_PROBES
38 (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON) setup.py build \
39 --build-base $(shell readlink -f $(builddir))/py2build \
40- install --prefix $(DESTDIR)$(prefix) \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041+ install --root $(DESTDIR) --prefix $(prefix) --prefix $(prefix) --install-lib=${pythondir} \
Brad Bishop37a0e4d2017-12-04 01:01:44 -050042 --single-version-externally-managed \
43 --record $(shell readlink -f $(builddir))/py2build/install_files.txt \
44 --verbose)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045@@ -55,7 +59,7 @@ endif
Brad Bishop37a0e4d2017-12-04 01:01:44 -050046 if HAVE_PYTHON3_PROBES
47 (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
48 --build-base $(shell readlink -f $(builddir))/py3build \
49- install --prefix $(DESTDIR)$(prefix) \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080050+ install --root $(DESTDIR) --prefix $(prefix) --install-lib=${python3dir} \
Brad Bishop37a0e4d2017-12-04 01:01:44 -050051 --single-version-externally-managed \
52 --record $(shell readlink -f $(builddir))/py3build/install_files.txt \
53 --verbose)
54--
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800552.7.4
Brad Bishop37a0e4d2017-12-04 01:01:44 -050056