diff mbox series

[1/1] package/pkg-python: fix headers install

Message ID 20220218102719.693274-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/pkg-python: fix headers install | expand

Commit Message

Fabrice Fontaine Feb. 18, 2022, 10:27 a.m. UTC
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>
---
 package/pkg-python.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Arnout Vandecappelle March 7, 2022, 9:45 p.m. UTC | #1
On 18/02/2022 11:27, Fabrice Fontaine wrote:
> For an unknown reason, installation of headers is broken since commit
> 7c1bb5c2bfdc9d726c41a66b30b7aa8e759c6596 which sets _PYTHON_PROJECT_BASE

  I've been trying to understand and I don't really understand what is going on 
either.

> As _PYTHON_PROJECT_BASE value seems correct and fix its own build

  This still looks fishy to me though :-(

  Still, we need to fix this somehow and this patch indeed fixes the issue. 
Therefore, applied to master, thanks.

  Regards,
  Arnout


> 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>
> ---
>   package/pkg-python.mk | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> index b8dc9cd9e5..c4e590bd70 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -51,10 +51,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)
>   
> @@ -81,12 +83,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 \
diff mbox series

Patch

diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index b8dc9cd9e5..c4e590bd70 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -51,10 +51,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)
 
@@ -81,12 +83,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 \