Browse Source

package/pkg-python: fix headers install

For an unknown reason, installation of headers is broken since commit
7c1bb5c2bfdc9d726c41a66b30b7aa8e759c6596 which sets _PYTHON_PROJECT_BASE

As _PYTHON_PROJECT_BASE value seems correct and fix its own build
failures, use --install-headers to set install path for headers and
avoid the following build failure with python-greenlet or python-pygame:

python-greenlet: installs files in /home/peko/autobuild/instance-0/output-1/target//home/peko/autobuild/instance-0/output-1

python-pygame: installs files in /home/peko/autobuild/instance-1/output-1/target//home/peko/autobuild/instance-1/output-1

Fixes:
 - http://autobuild.buildroot.org/results/f5b52dee7e72f0a1f72b9f87723bc585743c7b31
 - http://autobuild.buildroot.org/results/9eb2685d32756864000e1b38f8a183b57f6ea528

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Fabrice Fontaine 3 years ago
parent
commit
37cc5aecf5
1 changed files with 4 additions and 0 deletions
  1. 4 0
      package/pkg-python.mk

+ 4 - 0
package/pkg-python.mk

@@ -52,10 +52,12 @@ PKG_PYTHON_DISTUTILS_BUILD_OPTS = \
 	--executable=/usr/bin/python
 
 PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS = \
+	--install-headers=/usr/include/python$(PYTHON3_VERSION_MAJOR) \
 	--prefix=/usr \
 	--root=$(TARGET_DIR)
 
 PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS = \
+	--install-headers=/usr/include/python$(PYTHON3_VERSION_MAJOR) \
 	--prefix=/usr \
 	--root=$(STAGING_DIR)
 
@@ -84,12 +86,14 @@ PKG_PYTHON_SETUPTOOLS_ENV = \
 	_python_exec_prefix=/usr
 
 PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS = \
+	--install-headers=/usr/include/python$(PYTHON3_VERSION_MAJOR) \
 	--prefix=/usr \
 	--executable=/usr/bin/python \
 	--single-version-externally-managed \
 	--root=$(TARGET_DIR)
 
 PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS = \
+	--install-headers=/usr/include/python$(PYTHON3_VERSION_MAJOR) \
 	--prefix=/usr \
 	--executable=/usr/bin/python \
 	--single-version-externally-managed \