package/pkg-python: use proper --prefix and --root values
authorAngelo Compagnucci <angelo.compagnucci@gmail.com>
Sat, 24 Nov 2018 23:21:39 +0000 (00:21 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 25 Nov 2018 08:24:43 +0000 (09:24 +0100)
Some python software refers to setuptool/distutils options
to install files in python root directory (like data_files option).
To use this type of option, python root should point to the real python
root in buildroot folder and not to the guest os /.
Prefix path is always built starting from the python root, so it should
be simply /usr.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/pkg-python.mk

index f57e486dada7fee5fda331328b8b43ed95741431..1ee465ba5d633d9d4475c7b84746394e37d774bf 100644 (file)
@@ -42,10 +42,12 @@ PKG_PYTHON_DISTUTILS_BUILD_OPTS = \
        --executable=/usr/bin/python
 
 PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS = \
-       --prefix=$(TARGET_DIR)/usr
+       --prefix=/usr \
+       --root=$(TARGET_DIR)
 
 PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS = \
-       --prefix=$(STAGING_DIR)/usr
+       --prefix=/usr \
+       --root=$(STAGING_DIR)
 
 # Host distutils-based packages
 HOST_PKG_PYTHON_DISTUTILS_ENV = \
@@ -66,16 +68,16 @@ PKG_PYTHON_SETUPTOOLS_ENV = \
        _python_exec_prefix=/usr
 
 PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS = \
-       --prefix=$(TARGET_DIR)/usr \
+       --prefix=/usr \
        --executable=/usr/bin/python \
        --single-version-externally-managed \
-       --root=/
+       --root=$(TARGET_DIR)
 
 PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS = \
-       --prefix=$(STAGING_DIR)/usr \
+       --prefix=/usr \
        --executable=/usr/bin/python \
        --single-version-externally-managed \
-       --root=/
+       --root=$(STAGING_DIR)
 
 # Host setuptools-based packages
 HOST_PKG_PYTHON_SETUPTOOLS_ENV = \