* [PATCH] distutils/steuptools: Fix files layout and unbreak builds
@ 2012-08-24 16:15 Richard Purdie
2012-08-24 17:45 ` McClintock Matthew-B29882
2012-08-24 20:48 ` McClintock Matthew-B29882
0 siblings, 2 replies; 8+ messages in thread
From: Richard Purdie @ 2012-08-24 16:15 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 52a1aa8..c73b24f 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -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 \
diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
index ced9509..ba9cf13 100644
--- a/meta/classes/setuptools.bbclass
+++ b/meta/classes/setuptools.bbclass
@@ -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}"
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] distutils/steuptools: Fix files layout and unbreak builds
2012-08-24 16:15 [PATCH] distutils/steuptools: Fix files layout and unbreak builds Richard Purdie
@ 2012-08-24 17:45 ` McClintock Matthew-B29882
2012-08-24 20:48 ` McClintock Matthew-B29882
1 sibling, 0 replies; 8+ messages in thread
From: McClintock Matthew-B29882 @ 2012-08-24 17:45 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Fri, Aug 24, 2012 at 11:15 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> 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.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
> index 52a1aa8..c73b24f 100644
> --- a/meta/classes/distutils.bbclass
> +++ b/meta/classes/distutils.bbclass
> @@ -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 \
> diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
> index ced9509..ba9cf13 100644
> --- a/meta/classes/setuptools.bbclass
> +++ b/meta/classes/setuptools.bbclass
> @@ -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
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] distutils/steuptools: Fix files layout and unbreak builds
2012-08-24 16:15 [PATCH] distutils/steuptools: Fix files layout and unbreak builds Richard Purdie
2012-08-24 17:45 ` McClintock Matthew-B29882
@ 2012-08-24 20:48 ` McClintock Matthew-B29882
2012-08-24 20:51 ` Andrei Gherzan
2012-08-24 22:01 ` Richard Purdie
1 sibling, 2 replies; 8+ messages in thread
From: McClintock Matthew-B29882 @ 2012-08-24 20:48 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Fri, Aug 24, 2012 at 11:15 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> 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
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
> index 52a1aa8..c73b24f 100644
> --- a/meta/classes/distutils.bbclass
> +++ b/meta/classes/distutils.bbclass
> @@ -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}//
?
> bbfatal "python setup.py install execution failed."
>
> for i in `find ${D} -name "*.py"` ; do \
> diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
> index ced9509..ba9cf13 100644
> --- a/meta/classes/setuptools.bbclass
> +++ b/meta/classes/setuptools.bbclass
> @@ -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
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] distutils/steuptools: Fix files layout and unbreak builds
2012-08-24 20:48 ` McClintock Matthew-B29882
@ 2012-08-24 20:51 ` Andrei Gherzan
2012-08-24 20:56 ` McClintock Matthew-B29882
2012-08-24 22:01 ` Richard Purdie
1 sibling, 1 reply; 8+ messages in thread
From: Andrei Gherzan @ 2012-08-24 20:51 UTC (permalink / raw)
To: McClintock Matthew-B29882; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2395 bytes --]
On Fri, Aug 24, 2012 at 11:48 PM, McClintock Matthew-B29882 <
B29882@freescale.com> wrote:
> On Fri, Aug 24, 2012 at 11:15 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > 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.
>
>
Exactly what i was working on...
> Hmm, I think you don't need certain bits anymore
>
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> > diff --git a/meta/classes/distutils.bbclass
> b/meta/classes/distutils.bbclass
> > index 52a1aa8..c73b24f 100644
> > --- a/meta/classes/distutils.bbclass
> > +++ b/meta/classes/distutils.bbclass
> > @@ -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}//
>
> ?
>
> > bbfatal "python setup.py install execution failed."
> >
> > for i in `find ${D} -name "*.py"` ; do \
> > diff --git a/meta/classes/setuptools.bbclass
> b/meta/classes/setuptools.bbclass
> > index ced9509..ba9cf13 100644
> > --- a/meta/classes/setuptools.bbclass
> > +++ b/meta/classes/setuptools.bbclass
> > @@ -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
[-- Attachment #2: Type: text/html, Size: 3304 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] distutils/steuptools: Fix files layout and unbreak builds
2012-08-24 20:48 ` McClintock Matthew-B29882
2012-08-24 20:51 ` Andrei Gherzan
@ 2012-08-24 22:01 ` Richard Purdie
2012-08-27 19:23 ` McClintock Matthew-B29882
1 sibling, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2012-08-24 22:01 UTC (permalink / raw)
To: McClintock Matthew-B29882; +Cc: openembedded-core
On Fri, 2012-08-24 at 20:48 +0000, McClintock Matthew-B29882 wrote:
> On Fri, Aug 24, 2012 at 11:15 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > 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
>
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> > diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
> > index 52a1aa8..c73b24f 100644
> > --- a/meta/classes/distutils.bbclass
> > +++ b/meta/classes/distutils.bbclass
> > @@ -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}//
>
> ?
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
> > bbfatal "python setup.py install execution failed."
> >
> > for i in `find ${D} -name "*.py"` ; do \
> > diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
> > index ced9509..ba9cf13 100644
> > --- a/meta/classes/setuptools.bbclass
> > +++ b/meta/classes/setuptools.bbclass
> > @@ -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
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] distutils/steuptools: Fix files layout and unbreak builds
2012-08-24 22:01 ` Richard Purdie
@ 2012-08-27 19:23 ` McClintock Matthew-B29882
0 siblings, 0 replies; 8+ messages in thread
From: McClintock Matthew-B29882 @ 2012-08-27 19:23 UTC (permalink / raw)
To: Richard Purdie; +Cc: McClintock Matthew-B29882, openembedded-core
On Fri, Aug 24, 2012 at 5:01 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2012-08-24 at 20:48 +0000, McClintock Matthew-B29882 wrote:
>> On Fri, Aug 24, 2012 at 11:15 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > 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
>>
>> >
>> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> > ---
>> > diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
>> > index 52a1aa8..c73b24f 100644
>> > --- a/meta/classes/distutils.bbclass
>> > +++ b/meta/classes/distutils.bbclass
>> > @@ -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}//
>>
>> ?
>
> 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
>
> Cheers,
>
> Richard
>
>> > bbfatal "python setup.py install execution failed."
>> >
>> > for i in `find ${D} -name "*.py"` ; do \
>> > diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
>> > index ced9509..ba9cf13 100644
>> > --- a/meta/classes/setuptools.bbclass
>> > +++ b/meta/classes/setuptools.bbclass
>> > @@ -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
>> > Openembedded-core@lists.openembedded.org
>> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-08-27 20:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-24 16:15 [PATCH] distutils/steuptools: Fix files layout and unbreak builds Richard Purdie
2012-08-24 17:45 ` McClintock Matthew-B29882
2012-08-24 20:48 ` McClintock Matthew-B29882
2012-08-24 20:51 ` Andrei Gherzan
2012-08-24 20:56 ` McClintock Matthew-B29882
2012-08-24 20:58 ` Andrei Gherzan
2012-08-24 22:01 ` Richard Purdie
2012-08-27 19:23 ` McClintock Matthew-B29882
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox