Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 1 | From 2ada22f05460223924efe54080cb4419e2b4c276 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Fri, 24 Feb 2017 17:53:02 +0200 |
| 4 | Subject: [PATCH] Install python modules to correct library dir. |
| 5 | |
| 6 | Upstream-Status: Inappropriate [oe-core specific] |
| 7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 8 | |
| 9 | Add OE's CFLAGS which contains `-fdebug-prefix-map' options to |
| 10 | setup.py |
| 11 | |
| 12 | Supply "--root" directory to the "install" command, and use |
| 13 | it as a prefix to strip off the purported filename encoded |
| 14 | in bytecode files. (It strips build path prefix from .pyc files) |
| 15 | |
| 16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 17 | --- |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 18 | python/Makefile.am | 8 ++++++-- |
| 19 | 1 file changed, 6 insertions(+), 2 deletions(-) |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 20 | |
| 21 | diff --git a/python/Makefile.am b/python/Makefile.am |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 22 | index a254480..578602f 100644 |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 23 | --- a/python/Makefile.am |
| 24 | +++ b/python/Makefile.am |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 25 | @@ -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 Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 37 | 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 41 | + install --root $(DESTDIR) --prefix $(prefix) --prefix $(prefix) --install-lib=${pythondir} \ |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 42 | --single-version-externally-managed \ |
| 43 | --record $(shell readlink -f $(builddir))/py2build/install_files.txt \ |
| 44 | --verbose) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 45 | @@ -55,7 +59,7 @@ endif |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 46 | 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 50 | + install --root $(DESTDIR) --prefix $(prefix) --install-lib=${python3dir} \ |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 51 | --single-version-externally-managed \ |
| 52 | --record $(shell readlink -f $(builddir))/py3build/install_files.txt \ |
| 53 | --verbose) |
| 54 | -- |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 55 | 2.7.4 |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 56 | |