blob: d12492f022f987a33b9140632aefa8d11359c6df [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 1ea09e09ab2387c326bb7170835361ece6e25477 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Mon, 3 Aug 2015 13:43:14 +0800
4Subject: [PATCH] setup.py.in: add missing python include dir for cross
5 compiling
6
7Upstream-Status: inappropriate [oe-core specific]
8
9Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
10---
11 python/Makefile.am | 2 +-
12 python/setup.py.in | 3 ++-
13 2 files changed, 3 insertions(+), 2 deletions(-)
14
15diff --git a/python/Makefile.am b/python/Makefile.am
16index abc5cd3..e35ba71 100644
17--- a/python/Makefile.am
18+++ b/python/Makefile.am
19@@ -14,4 +14,4 @@ all-local:
20 CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-lib=.
21
22 install-exec-local:
23- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py install --prefix=${DESTDIR}${prefix}
24+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py install --prefix=${DESTDIR}${prefix} --install-lib=${DESTDIR}/${PYTHONSITEDIR}
25diff --git a/python/setup.py.in b/python/setup.py.in
26index 6457595..d3db0e5 100755
27--- a/python/setup.py.in
28+++ b/python/setup.py.in
29@@ -6,6 +6,7 @@
30
31 from distutils.core import setup, Extension
32 from distutils.command.build_ext import build_ext as _build_ext
33+import os
34
35 class build_ext(_build_ext):
36 def genconstants(self, headerfile, outputfile):
37@@ -23,7 +24,7 @@ class build_ext(_build_ext):
38
39 pwqmodule = Extension('pwquality',
40 sources = ['pwquality.c'],
41- include_dirs = ['../src'],
42+ include_dirs = ['../src', os.path.join(os.environ['STAGING_INCDIR'], os.environ['PYTHON_DIR'])],
43 library_dirs = ['../src/.libs'],
44 libraries = ['pwquality'])
45
46--
471.9.1
48