Skip to contentSkip to conversation

distutils/steuptools: Fix files layout and unbreak builds

PATCH In review Richard Purdie 3 participants 8 messages Aug 24, 2012 – Aug 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 distutils/steuptools: Fix files layout and unbreak builds

The last two distutils changes progressively broke the builds. Firstly they moved things from the site_packages directory to being higher up the tree which introduced package QA warnings as a side effect. Secondly, it interacts badly with setuptools which passes in --root=${D} itself.

This patch restores the original directory layout, hence fixing the QA warnings and also passes extra options to setuptools to deal with the --root option it passes.

---

meta/classes/distutils.bbclass +1 -1
index 52a1aa8..c73b24f 100644
@@ -38,7 +38,7 @@ distutils_do_install() {
         STAGING_LIBDIR=${STAGING_LIBDIR} \
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}${libdir}/${PYTHON_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
         bbfatal "python setup.py install execution failed."
 
         for i in `find ${D} -name "*.py"` ; do \
meta/classes/setuptools.bbclass +1 -0
index ced9509..ba9cf13 100644
@@ -5,4 +5,5 @@ DEPENDS += "python-setuptools-native"
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --single-version-externally-managed \
     --prefix=${prefix} \
+    --install-lib=${PYTHON_SITEPACKAGES_DIR} \
     --install-data=${datadir}"
#1 lore raw
Quoted 29 lines · Richard Purdie

The last two distutils changes progressively broke the builds. Firstly they moved things from the site_packages directory to being higher up the tree which introduced package QA warnings as a side effect. Secondly, it interacts badly with setuptools which passes in --root=${D} itself.

This patch restores the original directory layout, hence fixing the QA warnings and also passes extra options to setuptools to deal with the --root option it passes.

---

meta/classes/distutils.bbclass +1 -1
index 52a1aa8..c73b24f 100644
@@ -38,7 +38,7 @@ distutils_do_install() {
         STAGING_LIBDIR=${STAGING_LIBDIR} \
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}${libdir}/${PYTHON_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
         bbfatal "python setup.py install execution failed."
 
         for i in `find ${D} -name "*.py"` ; do \
meta/classes/setuptools.bbclass +0 -0
index ced9509..ba9cf13 100644

meta/classes/setuptools.bbclass DEPENDS += "python-setuptools-native" · line 9

Quoted 5 lines
meta/classes/setuptools.bbclass +1 -0
@@ -5,4 +5,5 @@ DEPENDS += "python-setuptools-native"
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --single-version-externally-managed \
     --prefix=${prefix} \
+    --install-lib=${PYTHON_SITEPACKAGES_DIR} \
     --install-data=${datadir}"

Looks good... stuff is packaged properly for the libdir = /usr/lib64

Thanks,
M

Quoted 7 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#2 lore raw
In reply to Richard Purdie
Quoted 8 lines · Richard Purdie

The last two distutils changes progressively broke the builds. Firstly they moved things from the site_packages directory to being higher up the tree which introduced package QA warnings as a side effect. Secondly, it interacts badly with setuptools which passes in --root=${D} itself.

This patch restores the original directory layout, hence fixing the QA warnings and also passes extra options to setuptools to deal with the --root option it passes.

Hmm, I think you don't need certain bits anymore

meta/classes/distutils.bbclass distutils_do_install() { · line 41

Quoted 13 lines

---

meta/classes/distutils.bbclass +1 -1
index 52a1aa8..c73b24f 100644
@@ -38,7 +38,7 @@ distutils_do_install() {
         STAGING_LIBDIR=${STAGING_LIBDIR} \
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}${libdir}/${PYTHON_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \

This change should be handled by the bit below? So you could

s/--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR}//

?

Quoted 20 lines
meta/classes/distutils.bbclass +0 -0
         bbfatal "python setup.py install execution failed."
 
         for i in `find ${D} -name "*.py"` ; do \
meta/classes/setuptools.bbclass +1 -0
index ced9509..ba9cf13 100644
@@ -5,4 +5,5 @@ DEPENDS += "python-setuptools-native"
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --single-version-externally-managed \
     --prefix=${prefix} \
+    --install-lib=${PYTHON_SITEPACKAGES_DIR} \
     --install-data=${datadir}"

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 14 lines · On Fri, Aug 24, 2012 at 11:48 PM, McClintock Matthew-B29882 <…
Quoted 1 line · Richard Purdie

The last two distutils changes progressively broke the builds. Firstly

they

Quoted 2 lines

moved things from the site_packages directory to being higher up the tree which introduced package QA warnings as a side effect. Secondly, it

interacts

Quoted 5 lines

badly with setuptools which passes in --root=${D} itself.

This patch restores the original directory layout, hence fixing the QA warnings and also passes extra options to setuptools to deal with the --root option it passes.

Exactly what i was working on...

Quoted 30 lines

Hmm, I think you don't need certain bits anymore

Review

Quoted 4 lines

---

(quoted diff) +0 -0

b/meta/classes/distutils.bbclass

meta/classes/distutils.bbclass distutils_do_install() { · line 41

Quoted 8 lines

index 52a1aa8..c73b24f 100644

meta/classes/distutils.bbclass +0 -1
@@ -38,7 +38,7 @@ distutils_do_install() {
         STAGING_LIBDIR=${STAGING_LIBDIR} \
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install

--install-lib=${D}${libdir}/${PYTHON_DIR} ${DISTUTILS_INSTALL_ARGS} || \

meta/classes/distutils.bbclass distutils_do_install() { · line 41

Quoted 1 line
meta/classes/distutils.bbclass +1 -0
+        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install

--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \

This change should be handled by the bit below? So you could

s/--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR}//

?

Review

Quoted 4 lines
meta/classes/distutils.bbclass +0 -0
         bbfatal "python setup.py install execution failed."
 
         for i in `find ${D} -name "*.py"` ; do \
(quoted diff) +0 -0

b/meta/classes/setuptools.bbclass

Quoted 10 lines

meta/classes/setuptools.bbclass DEPENDS += "python-setuptools-native" · line 9

Quoted 9 lines

index ced9509..ba9cf13 100644

meta/classes/setuptools.bbclass +1 -0
@@ -5,4 +5,5 @@ DEPENDS += "python-setuptools-native"
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --single-version-externally-managed \
     --prefix=${prefix} \
+    --install-lib=${PYTHON_SITEPACKAGES_DIR} \
     --install-data=${datadir}"

Exactly my fix. Please merge.

Andrei

#5 lore raw
Quoted 4 lines · On Fri, Aug 24, 2012 at 11:56 PM, McClintock Matthew-B29882 <…
Quoted 1 line · Andrei Gherzan

Exactly my fix. Please merge.

It's already been merged.

Ding! Thanks.

ag

#6 lore raw
In reply to McClintock Matthew-B29882
Quoted 29 lines · On Fri, 2012-08-24 at 20:48 +0000, McClintock Matthew-B29882 wrote:
Quoted 8 lines · Richard Purdie

The last two distutils changes progressively broke the builds. Firstly they moved things from the site_packages directory to being higher up the tree which introduced package QA warnings as a side effect. Secondly, it interacts badly with setuptools which passes in --root=${D} itself.

This patch restores the original directory layout, hence fixing the QA warnings and also passes extra options to setuptools to deal with the --root option it passes.

Hmm, I think you don't need certain bits anymore

meta/classes/distutils.bbclass distutils_do_install() { · line 41

Quoted 13 lines

---

meta/classes/distutils.bbclass +1 -1
index 52a1aa8..c73b24f 100644
@@ -38,7 +38,7 @@ distutils_do_install() {
         STAGING_LIBDIR=${STAGING_LIBDIR} \
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}${libdir}/${PYTHON_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \

This change should be handled by the bit below? So you could

Quoted 3 lines

s/--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR}//

?

Not everything uses setuptools, there are things using just disutils. I'm open to further cleanup of this but we need to consider both cases...

Cheers,

Richard

Quoted 21 lines
Quoted 20 lines
meta/classes/distutils.bbclass +0 -0
         bbfatal "python setup.py install execution failed."
 
         for i in `find ${D} -name "*.py"` ; do \
meta/classes/setuptools.bbclass +1 -0
index ced9509..ba9cf13 100644
@@ -5,4 +5,5 @@ DEPENDS += "python-setuptools-native"
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --single-version-externally-managed \
     --prefix=${prefix} \
+    --install-lib=${PYTHON_SITEPACKAGES_DIR} \
     --install-data=${datadir}"

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#7 lore raw
Quoted 30 lines · Richard Purdie
Quoted 29 lines · On Fri, 2012-08-24 at 20:48 +0000, McClintock Matthew-B29882 wrote:
Quoted 8 lines · Richard Purdie

The last two distutils changes progressively broke the builds. Firstly they moved things from the site_packages directory to being higher up the tree which introduced package QA warnings as a side effect. Secondly, it interacts badly with setuptools which passes in --root=${D} itself.

This patch restores the original directory layout, hence fixing the QA warnings and also passes extra options to setuptools to deal with the --root option it passes.

Hmm, I think you don't need certain bits anymore

meta/classes/distutils.bbclass distutils_do_install() { · line 41

Quoted 13 lines

---

meta/classes/distutils.bbclass +1 -1
index 52a1aa8..c73b24f 100644
@@ -38,7 +38,7 @@ distutils_do_install() {
         STAGING_LIBDIR=${STAGING_LIBDIR} \
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}${libdir}/${PYTHON_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+        ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \

This change should be handled by the bit below? So you could

Quoted 7 lines
Quoted 3 lines

s/--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR}//

?

Not everything uses setuptools, there are things using just disutils. I'm open to further cleanup of this but we need to consider both cases...

Ah right, I incorrectly assumed both of these always applied.

Thanks for looking at this.

-M

Quoted 33 lines

Cheers,

Richard

Quoted 16 lines
Quoted 16 lines
meta/classes/distutils.bbclass +0 -0
         bbfatal "python setup.py install execution failed."
 
         for i in `find ${D} -name "*.py"` ; do \
meta/classes/setuptools.bbclass +1 -0
index ced9509..ba9cf13 100644
@@ -5,4 +5,5 @@ DEPENDS += "python-setuptools-native"
 DISTUTILS_INSTALL_ARGS = "--root=${D} \
     --single-version-externally-managed \
     --prefix=${prefix} \
+    --install-lib=${PYTHON_SITEPACKAGES_DIR} \
     --install-data=${datadir}"
Quoted 5 lines
Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core