From 1ea09e09ab2387c326bb7170835361ece6e25477 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 3 Aug 2015 13:43:14 +0800
Subject: [PATCH] setup.py.in: add missing python include dir for cross
 compiling

Upstream-Status: inappropriate [oe-core specific]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 python/Makefile.am | 2 +-
 python/setup.py.in | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/python/Makefile.am b/python/Makefile.am
index 1d00c0c..52816b2 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -14,7 +14,7 @@ all-local:
 	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
 
 install-exec-local:
-	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
+	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix} --install-lib=${DESTDIR}/${PYTHONSITEDIR}
 
 clean-local:
 	rm -rf py$(PYTHONREV)
diff --git a/python/setup.py.in b/python/setup.py.in
index a741b91..6759a95 100755
--- a/python/setup.py.in
+++ b/python/setup.py.in
@@ -33,7 +33,7 @@ class sdist(_sdist):
 
 pwqmodule = Extension('pwquality',
             sources = ['pwquality.c'],
-            include_dirs = ['../src'],
+            include_dirs = ['../src', os.path.join(os.environ['STAGING_INCDIR'], os.environ['PYTHON_DIR'])],
             library_dirs = ['../src/.libs'],
             libraries = ['pwquality'])
 
-- 
2.17.1

