Message ID | 20221005104810.16863-1-david.bagonyi@gmail.com |
---|---|
State | New |
Headers | show |
Series | gpgme: Allow setuptools3-base to be excluded from the inherit list | expand |
> On 5 Oct 2022, at 11:48, David Bagonyi via lists.openembedded.org <david.bagonyi=gmail.com@lists.openembedded.org> wrote: > PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" > PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native python3targetconfig', '', d)}" > +PYTHON_INHERIT .= "${@bb.utils.contains('LANGUAGES', 'python', 'setuptools3-base', '', d)}” Note that setuptools3-base itself inherits python3native and python3targetconfig. This is important due to ordering: if python2 is selected then pythonnative needs to be inherited *after* setuptools3-base so that PYTHON is python2 and not python3. However as Py2 has been EOL for nearly three years now, I suggest we just rip out all of the python2 parts in the process of fixing the inherit. Ross
> -----Original Message----- > From: openembedded-core@lists.openembedded.org <openembedded- > core@lists.openembedded.org> On Behalf Of Ross Burton > Sent: den 5 oktober 2022 13:27 > To: david.bagonyi@gmail.com > Cc: openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH] gpgme: Allow setuptools3-base to be > excluded from the inherit list > > > On 5 Oct 2022, at 11:48, David Bagonyi via lists.openembedded.org <david.bagonyi=gmail.com@lists.openembedded.org> wrote: > > PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" > > PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native python3targetconfig', '', d)}" > > +PYTHON_INHERIT .= "${@bb.utils.contains('LANGUAGES', 'python', 'setuptools3-base', '', d)}” > > Note that setuptools3-base itself inherits python3native and > python3targetconfig. This is important due to ordering: if python2 is > selected then pythonnative needs to be inherited *after* setuptools3-base > so that PYTHON is python2 and not python3. > > However as Py2 has been EOL for nearly three years now, I suggest we just > rip out all of the python2 parts in the process of fixing the inherit. > > Ross Also note that the above should use "+=" rather than ".=", as otherwise the inherits will be concatenated into a mess without spaces if multiple options are enabled at the same time. //Peter
diff --git a/meta/recipes-support/gpgme/gpgme_1.18.0.bb b/meta/recipes-support/gpgme/gpgme_1.18.0.bb index ca9c6cab14..af5b176363 100644 --- a/meta/recipes-support/gpgme/gpgme_1.18.0.bb +++ b/meta/recipes-support/gpgme/gpgme_1.18.0.bb @@ -50,6 +50,7 @@ LANGUAGES ?= "${DEFAULT_LANGUAGES} python" PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native python3targetconfig', '', d)}" +PYTHON_INHERIT .= "${@bb.utils.contains('LANGUAGES', 'python', 'setuptools3-base', '', d)}" EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-gpgconf-test \ @@ -59,7 +60,7 @@ EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-lang-python-test \ ' -inherit autotools texinfo binconfig-disabled pkgconfig setuptools3-base ${PYTHON_INHERIT} multilib_header +inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT} multilib_header export PKG_CONFIG='pkg-config'
Inheriting setuptools3-base adds a runtime dependency on Python. This change makes inheriting setuptools3-base optional. If one does not want a runtime dependency on Python, they can remove python from LANGUAGES. Signed-off-by: David Bagonyi <david.bagonyi@gmail.com> --- meta/recipes-support/gpgme/gpgme_1.18.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)