Skip to contentSkip to conversation

gpgme: Allow setuptools3-base to be excluded from the inherit list

PATCH Superseded David Bagonyi 3 participants 3 messages Oct 5, 2022

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpgme: Allow setuptools3-base to be excluded from the inherit list

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.

---
 meta/recipes-support/gpgme/gpgme_1.18.0.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-support/gpgme/gpgme_1.18.0.bb +2 -1
index ca9c6cab14..af5b176363 100644
@@ -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'
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · David Bagonyi via lists.openembedded.org

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

#2 lore raw
Quoted 19 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Ross Burton
Sent: den 5 oktober 2022 13:27
To: [email protected]
Cc: [email protected]
Subject: Re: [OE-core] [PATCH] gpgme: Allow setuptools3-base to be excluded from the inherit list

Quoted 4 lines · David Bagonyi via lists.openembedded.org

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.

Quoted 4 lines

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