From: Julien Stephan <jstephan@baylibre.com>
To: openembedded-core@lists.openembedded.org
Cc: Julien Stephan <jstephan@baylibre.com>
Subject: [PATCH v3 1/4] scripts:recipetool:create_buildsys_python: prefix created recipes with python3-
Date: Tue, 24 Oct 2023 16:40:18 +0200 [thread overview]
Message-ID: <20231024144022.1532605-2-jstephan@baylibre.com> (raw)
In-Reply-To: <20231024144022.1532605-1-jstephan@baylibre.com>
By convention, all python recipes start with "python3-" so update
create_buildsys_python to do this
This rule doesn't apply for packages already starting with "python"
Update recipetool's selftest accordingly
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
meta/lib/oeqa/selftest/cases/recipetool.py | 4 ++--
scripts/lib/recipetool/create_buildsys_python.py | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index 48661bee6f2..d3aea74228f 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -445,7 +445,7 @@ class RecipetoolCreateTests(RecipetoolBase):
# Basic test to see if github URL mangling works
temprecipe = os.path.join(self.tempdir, 'recipe')
os.makedirs(temprecipe)
- recipefile = os.path.join(temprecipe, 'meson_git.bb')
+ recipefile = os.path.join(temprecipe, 'python3-meson_git.bb')
srcuri = 'https://github.com/mesonbuild/meson;rev=0.32.0'
result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri])
self.assertTrue(os.path.isfile(recipefile))
@@ -479,7 +479,7 @@ class RecipetoolCreateTests(RecipetoolBase):
temprecipe = os.path.join(self.tempdir, 'recipe')
os.makedirs(temprecipe)
pv = '0.32.0'
- recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv)
+ recipefile = os.path.join(temprecipe, 'python3-meson_%s.bb' % pv)
srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv)
result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
self.assertTrue(os.path.isfile(recipefile))
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index 321d0ba257d..502e1dfbc3d 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -297,6 +297,11 @@ class PythonRecipeHandler(RecipeHandler):
value = ' '.join(str(v) for v in values if v)
bbvar = self.bbvar_map[field]
+ if bbvar == "PN":
+ # by convention python recipes start with "python3-"
+ if not value.startswith('python'):
+ value = 'python3-' + value
+
if bbvar not in extravalues and value:
extravalues[bbvar] = value
--
2.42.0
next prev parent reply other threads:[~2023-10-24 14:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 14:40 [PATCH v3 0/4] devtool/recipetool: add support of PEP-517 Julien Stephan
2023-10-24 14:40 ` Julien Stephan [this message]
2023-10-24 14:40 ` [PATCH v3 2/4] scripts:recipetool:create_buildsys_python: refactor code for futur PEP517 addition Julien Stephan
2023-10-24 14:40 ` [PATCH v3 3/4] scripts:recipetool:create_buildsys_python: add PEP517 support Julien Stephan
2023-10-24 14:40 ` [PATCH v3 4/4] oeqa/selftest/recipetool: add selftest for PEP-517 recipe creation Julien Stephan
2023-10-25 14:11 ` [OE-core] [PATCH v3 0/4] devtool/recipetool: add support of PEP-517 Richard Purdie
2023-10-25 15:48 ` Julien Stephan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231024144022.1532605-2-jstephan@baylibre.com \
--to=jstephan@baylibre.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox