1From 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 1d00c0c..52816b2 100644
17--- a/python/Makefile.am
18+++ b/python/Makefile.am
19@@ -14,7 +14,7 @@ all-local:
20 	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
21
22 install-exec-local:
23-	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
24+	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix} --install-lib=${DESTDIR}/${PYTHONSITEDIR}
25
26 clean-local:
27 	rm -rf py$(PYTHONREV)
28diff --git a/python/setup.py.in b/python/setup.py.in
29index a741b91..6759a95 100755
30--- a/python/setup.py.in
31+++ b/python/setup.py.in
32@@ -33,7 +33,7 @@ class sdist(_sdist):
33
34 pwqmodule = Extension('pwquality',
35             sources = ['pwquality.c'],
36-            include_dirs = ['../src'],
37+            include_dirs = ['../src', os.path.join(os.environ['STAGING_INCDIR'], os.environ['PYTHON_DIR'])],
38             library_dirs = ['../src/.libs'],
39             libraries = ['pwquality'])
40
41--
422.17.1
43
44