* [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS
@ 2022-03-07 19:42 Ross Burton
2022-03-07 19:42 ` [PATCH 2/4] python3-pip: remove obsolete and confusing comment Ross Burton
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Ross Burton @ 2022-03-07 19:42 UTC (permalink / raw)
To: openembedded-core
If we expect users to extend this we should use =, as otherwise a recipe
that does += will replace the default value.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/classes/pip_install_wheel.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass
index c1680a24ed..febcc8e445 100644
--- a/meta/classes/pip_install_wheel.bbclass
+++ b/meta/classes/pip_install_wheel.bbclass
@@ -10,7 +10,7 @@ PIP_INSTALL_PACKAGE ?= "${@guess_pip_install_package_name(d)}"
PIP_INSTALL_DIST_PATH ?= "${@d.getVar('SETUPTOOLS_SETUP_PATH') or d.getVar('B')}/dist"
PYPA_WHEEL ??= "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-*-*.whl"
-PIP_INSTALL_ARGS ?= "\
+PIP_INSTALL_ARGS = "\
-vvvv \
--ignore-installed \
--no-cache \
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] python3-pip: remove obsolete and confusing comment
2022-03-07 19:42 [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Ross Burton
@ 2022-03-07 19:42 ` Ross Burton
2022-03-07 19:42 ` [PATCH 3/4] flit_core: clean up configure/compile Ross Burton
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Ross Burton @ 2022-03-07 19:42 UTC (permalink / raw)
To: openembedded-core
This comment is very obsolete.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/recipes-devtools/python/python3-pip_22.0.3.bb | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta/recipes-devtools/python/python3-pip_22.0.3.bb b/meta/recipes-devtools/python/python3-pip_22.0.3.bb
index 7eb9fb69ba..8d6dfcede7 100644
--- a/meta/recipes-devtools/python/python3-pip_22.0.3.bb
+++ b/meta/recipes-devtools/python/python3-pip_22.0.3.bb
@@ -45,7 +45,6 @@ EOF
}
do_install:append() {
- # Install as pip3 and leave pip2 as default
if [ -e ${D}/${bindir}/pip ]; then
rm ${D}/${bindir}/pip
fi
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] flit_core: clean up configure/compile
2022-03-07 19:42 [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Ross Burton
2022-03-07 19:42 ` [PATCH 2/4] python3-pip: remove obsolete and confusing comment Ross Burton
@ 2022-03-07 19:42 ` Ross Burton
2022-03-07 19:42 ` [PATCH 4/4] setuptools_build_meta: " Ross Burton
2022-03-07 20:06 ` [OE-core] [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Konrad Weihmann
3 siblings, 0 replies; 8+ messages in thread
From: Ross Burton @ 2022-03-07 19:42 UTC (permalink / raw)
To: openembedded-core
Make do_configure do nothing by default as the base configure isn't
useful, and invoke the build API directly instead of writing a script.
In the future, this can simply call python3-build.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/classes/flit_core.bbclass | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/meta/classes/flit_core.bbclass b/meta/classes/flit_core.bbclass
index 819d12457c..a7667795fe 100644
--- a/meta/classes/flit_core.bbclass
+++ b/meta/classes/flit_core.bbclass
@@ -3,15 +3,13 @@ inherit pip_install_wheel python3native python3-dir setuptools3-base
DEPENDS += "python3 python3-flit-core-native python3-pip-native"
flit_core_do_configure () {
- mkdir -p ${S}/dist
- cat > ${S}/build-it.py << EOF
-from flit_core import buildapi
-buildapi.build_wheel('./dist')
-EOF
+ :
}
+# TODO: ideally this uses pypa/build
flit_core_do_compile () {
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/build-it.py
+ mkdir -p ${S}/dist
+ nativepython3 -c "from flit_core import buildapi; buildapi.build_wheel('./dist')"
}
EXPORT_FUNCTIONS do_configure do_compile
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] setuptools_build_meta: clean up configure/compile
2022-03-07 19:42 [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Ross Burton
2022-03-07 19:42 ` [PATCH 2/4] python3-pip: remove obsolete and confusing comment Ross Burton
2022-03-07 19:42 ` [PATCH 3/4] flit_core: clean up configure/compile Ross Burton
@ 2022-03-07 19:42 ` Ross Burton
2022-03-07 20:06 ` [OE-core] [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Konrad Weihmann
3 siblings, 0 replies; 8+ messages in thread
From: Ross Burton @ 2022-03-07 19:42 UTC (permalink / raw)
To: openembedded-core
Make do_configure do nothing by default as the base configure isn't
useful, and invoke the build API directly instead of writing a script.
In the future, this can simply call python3-build.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/classes/setuptools_build_meta.bbclass | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/meta/classes/setuptools_build_meta.bbclass b/meta/classes/setuptools_build_meta.bbclass
index 8f5479e922..0651cca0a0 100644
--- a/meta/classes/setuptools_build_meta.bbclass
+++ b/meta/classes/setuptools_build_meta.bbclass
@@ -3,16 +3,13 @@ inherit pip_install_wheel setuptools3-base
DEPENDS += "python3-setuptools-native python3-wheel-native"
setuptools_build_meta_do_configure () {
- mkdir -p ${S}/dist
- cat > ${S}/build-it.py << EOF
-from setuptools import build_meta
-wheel = build_meta.build_wheel('./dist')
-print(wheel)
-EOF
+ :
}
+# TODO: ideally this uses pypa/build
setuptools_build_meta_do_compile () {
- nativepython3 ${S}/build-it.py
+ mkdir -p ${S}/dist
+ nativepython3 -c "from setuptools import build_meta; build_meta.build_wheel('./dist')"
}
EXPORT_FUNCTIONS do_configure do_compile
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS
2022-03-07 19:42 [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Ross Burton
` (2 preceding siblings ...)
2022-03-07 19:42 ` [PATCH 4/4] setuptools_build_meta: " Ross Burton
@ 2022-03-07 20:06 ` Konrad Weihmann
2022-03-07 21:17 ` Ross Burton
3 siblings, 1 reply; 8+ messages in thread
From: Konrad Weihmann @ 2022-03-07 20:06 UTC (permalink / raw)
To: Ross Burton, openembedded-core
On 07.03.22 20:42, Ross Burton wrote:
> If we expect users to extend this we should use =, as otherwise a recipe
> that does += will replace the default value.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> meta/classes/pip_install_wheel.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass
> index c1680a24ed..febcc8e445 100644
> --- a/meta/classes/pip_install_wheel.bbclass
> +++ b/meta/classes/pip_install_wheel.bbclass
> @@ -10,7 +10,7 @@ PIP_INSTALL_PACKAGE ?= "${@guess_pip_install_package_name(d)}"
> PIP_INSTALL_DIST_PATH ?= "${@d.getVar('SETUPTOOLS_SETUP_PATH') or d.getVar('B')}/dist"
> PYPA_WHEEL ??= "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-*-*.whl"
>
> -PIP_INSTALL_ARGS ?= "\
> +PIP_INSTALL_ARGS = "\
> -vvvv \
> --ignore-installed \
> --no-cache \
>
>
Hmm all of the classes use ?= and I think for a reason - this isn't the
fault of the bbclass but of the recipe in the end, as += is known to
cause this depending on where the additions have been added (before the
inherit or after it) - I think the better way would be to use
PIP_INSTALL_ARGS:append in the actual recipe - guess the fallout would
be way less than the one I expect from this change.
The big question is if that should changeable by the user or not - I
personally think it should be
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#162860): https://lists.openembedded.org/g/openembedded-core/message/162860
> Mute This Topic: https://lists.openembedded.org/mt/89621292/3647476
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [kweihmann@outlook.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS
2022-03-07 20:06 ` [OE-core] [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Konrad Weihmann
@ 2022-03-07 21:17 ` Ross Burton
2022-03-08 7:40 ` Konrad Weihmann
0 siblings, 1 reply; 8+ messages in thread
From: Ross Burton @ 2022-03-07 21:17 UTC (permalink / raw)
To: Konrad Weihmann; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]
Personally I can’t see any reason to extend the pip install arguments. What
option do you think would be used by a recipe?
Ross
On Mon, 7 Mar 2022 at 20:06, Konrad Weihmann <kweihmann@outlook.com> wrote:
>
> On 07.03.22 20:42, Ross Burton wrote:
> > If we expect users to extend this we should use =, as otherwise a recipe
> > that does += will replace the default value.
> >
> > Signed-off-by: Ross Burton <ross.burton@arm.com>
> > ---
> > meta/classes/pip_install_wheel.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/pip_install_wheel.bbclass
> b/meta/classes/pip_install_wheel.bbclass
> > index c1680a24ed..febcc8e445 100644
> > --- a/meta/classes/pip_install_wheel.bbclass
> > +++ b/meta/classes/pip_install_wheel.bbclass
> > @@ -10,7 +10,7 @@ PIP_INSTALL_PACKAGE ?=
> "${@guess_pip_install_package_name(d)}"
> > PIP_INSTALL_DIST_PATH ?= "${@d.getVar('SETUPTOOLS_SETUP_PATH') or
> d.getVar('B')}/dist"
> > PYPA_WHEEL ??=
> "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-*-*.whl"
> >
> > -PIP_INSTALL_ARGS ?= "\
> > +PIP_INSTALL_ARGS = "\
> > -vvvv \
> > --ignore-installed \
> > --no-cache \
> >
> >
>
> Hmm all of the classes use ?= and I think for a reason - this isn't the
> fault of the bbclass but of the recipe in the end, as += is known to
> cause this depending on where the additions have been added (before the
> inherit or after it) - I think the better way would be to use
> PIP_INSTALL_ARGS:append in the actual recipe - guess the fallout would
> be way less than the one I expect from this change.
>
> The big question is if that should changeable by the user or not - I
> personally think it should be
>
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#162860):
> https://lists.openembedded.org/g/openembedded-core/message/162860
> > Mute This Topic: https://lists.openembedded.org/mt/89621292/3647476
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> kweihmann@outlook.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
[-- Attachment #2: Type: text/html, Size: 3389 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS
2022-03-07 21:17 ` Ross Burton
@ 2022-03-08 7:40 ` Konrad Weihmann
2022-03-08 11:47 ` Ross Burton
0 siblings, 1 reply; 8+ messages in thread
From: Konrad Weihmann @ 2022-03-08 7:40 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
On 07.03.22 22:17, Ross Burton wrote:
> Personally I can’t see any reason to extend the pip install arguments.
> What option do you think would be used by a recipe?
For instance the --user option is something that I used once in a setup.
Plus --global-option for passing additional options into the
installation scripting.
I give you that, that these are used rarely - and still could be used,
if the recipes would be tweaked to append after the inherit statement.
And in my mind it was always like a variable with a weak assignment
could be changed by the user, the ones with a hard assignment shouldn't
be touched - but that could be just my mind 😅
>
> Ross
>
> On Mon, 7 Mar 2022 at 20:06, Konrad Weihmann <kweihmann@outlook.com
> <mailto:kweihmann@outlook.com>> wrote:
>
>
> On 07.03.22 20:42, Ross Burton wrote:
> > If we expect users to extend this we should use =, as otherwise a
> recipe
> > that does += will replace the default value.
> >
> > Signed-off-by: Ross Burton <ross.burton@arm.com
> <mailto:ross.burton@arm.com>>
> > ---
> > meta/classes/pip_install_wheel.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/pip_install_wheel.bbclass
> b/meta/classes/pip_install_wheel.bbclass
> > index c1680a24ed..febcc8e445 100644
> > --- a/meta/classes/pip_install_wheel.bbclass
> > +++ b/meta/classes/pip_install_wheel.bbclass
> > @@ -10,7 +10,7 @@ PIP_INSTALL_PACKAGE ?=
> "${@guess_pip_install_package_name(d)}"
> > PIP_INSTALL_DIST_PATH ?= "${@d.getVar('SETUPTOOLS_SETUP_PATH')
> or d.getVar('B')}/dist"
> > PYPA_WHEEL ??=
> "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-*-*.whl"
> >
> > -PIP_INSTALL_ARGS ?= "\
> > +PIP_INSTALL_ARGS = "\
> > -vvvv \
> > --ignore-installed \
> > --no-cache \
> >
> >
>
> Hmm all of the classes use ?= and I think for a reason - this isn't the
> fault of the bbclass but of the recipe in the end, as += is known to
> cause this depending on where the additions have been added (before the
> inherit or after it) - I think the better way would be to use
> PIP_INSTALL_ARGS:append in the actual recipe - guess the fallout would
> be way less than the one I expect from this change.
>
> The big question is if that should changeable by the user or not - I
> personally think it should be
>
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#162860):
> https://lists.openembedded.org/g/openembedded-core/message/162860
> <https://lists.openembedded.org/g/openembedded-core/message/162860>
> > Mute This Topic:
> https://lists.openembedded.org/mt/89621292/3647476
> <https://lists.openembedded.org/mt/89621292/3647476>
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> <mailto:openembedded-core%2Bowner@lists.openembedded.org>
> > Unsubscribe:
> https://lists.openembedded.org/g/openembedded-core/unsub
> <https://lists.openembedded.org/g/openembedded-core/unsub>
> [kweihmann@outlook.com <mailto:kweihmann@outlook.com>]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS
2022-03-08 7:40 ` Konrad Weihmann
@ 2022-03-08 11:47 ` Ross Burton
0 siblings, 0 replies; 8+ messages in thread
From: Ross Burton @ 2022-03-08 11:47 UTC (permalink / raw)
To: Konrad Weihmann; +Cc: openembedded-core
On Tue, 8 Mar 2022 at 07:40, Konrad Weihmann <kweihmann@outlook.com> wrote:
> For instance the --user option is something that I used once in a setup.
This is the pip_install_wheel class for installing wheels to the
system library directory, so --user wouldn't be useful surely?
Ross
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-03-08 11:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07 19:42 [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Ross Burton
2022-03-07 19:42 ` [PATCH 2/4] python3-pip: remove obsolete and confusing comment Ross Burton
2022-03-07 19:42 ` [PATCH 3/4] flit_core: clean up configure/compile Ross Burton
2022-03-07 19:42 ` [PATCH 4/4] setuptools_build_meta: " Ross Burton
2022-03-07 20:06 ` [OE-core] [PATCH 1/4] pip_install_wheel: don't lazy assign PIPINSTALLARGS Konrad Weihmann
2022-03-07 21:17 ` Ross Burton
2022-03-08 7:40 ` Konrad Weihmann
2022-03-08 11:47 ` Ross Burton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.