Patchwork distutils.bbclass: fix libdir for 64-bit python modules built with distutils

login
register
mail settings
Submitter Matthew McClintock
Date Aug. 13, 2012, 7:44 p.m.
Message ID <1344887071-10378-1-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/34375/
State Accepted
Commit bc6bd774aa8a3e085e9cabcefb11c3fc537139d5
Headers show

Comments

Matthew McClintock - Aug. 13, 2012, 7:44 p.m.
Without this some modules will be intalled in /usr/lib/python2.6/
instead of /usr/${libdir}/python2.6

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 meta/classes/distutils.bbclass |    1 +
 1 file changed, 1 insertion(+)
Saul Wold - Aug. 17, 2012, 8:59 p.m.
On 08/13/2012 12:44 PM, Matthew McClintock wrote:
> Without this some modules will be intalled in /usr/lib/python2.6/
> instead of /usr/${libdir}/python2.6
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
>   meta/classes/distutils.bbclass |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
> index 690df73..7588b81 100644
> --- a/meta/classes/distutils.bbclass
> +++ b/meta/classes/distutils.bbclass
> @@ -39,6 +39,7 @@ distutils_do_install() {
>           PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
>           BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
>           ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \
> +        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install ${DISTUTILS_INSTALL_ARGS} --install-lib=${D}${libdir}/${PYTHON_DIR} || \
>           bbfatal "python setup.py install execution failed."
>
>           for i in `find ${D} -name "*.py"` ; do \
>
Merged into OE-Core

Thanks
	Sau!

Patch

diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 690df73..7588b81 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -39,6 +39,7 @@  distutils_do_install() {
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \
+        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install ${DISTUTILS_INSTALL_ARGS} --install-lib=${D}${libdir}/${PYTHON_DIR} || \
         bbfatal "python setup.py install execution failed."
 
         for i in `find ${D} -name "*.py"` ; do \