diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/recipetool.py | 4 | ||||
-rw-r--r-- | 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 48661bee6f..d3aea74228 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
@@ -445,7 +445,7 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
445 | # Basic test to see if github URL mangling works | 445 | # Basic test to see if github URL mangling works |
446 | temprecipe = os.path.join(self.tempdir, 'recipe') | 446 | temprecipe = os.path.join(self.tempdir, 'recipe') |
447 | os.makedirs(temprecipe) | 447 | os.makedirs(temprecipe) |
448 | recipefile = os.path.join(temprecipe, 'meson_git.bb') | 448 | recipefile = os.path.join(temprecipe, 'python3-meson_git.bb') |
449 | srcuri = 'https://github.com/mesonbuild/meson;rev=0.32.0' | 449 | srcuri = 'https://github.com/mesonbuild/meson;rev=0.32.0' |
450 | result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri]) | 450 | result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri]) |
451 | self.assertTrue(os.path.isfile(recipefile)) | 451 | self.assertTrue(os.path.isfile(recipefile)) |
@@ -479,7 +479,7 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
479 | temprecipe = os.path.join(self.tempdir, 'recipe') | 479 | temprecipe = os.path.join(self.tempdir, 'recipe') |
480 | os.makedirs(temprecipe) | 480 | os.makedirs(temprecipe) |
481 | pv = '0.32.0' | 481 | pv = '0.32.0' |
482 | recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv) | 482 | recipefile = os.path.join(temprecipe, 'python3-meson_%s.bb' % pv) |
483 | srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) | 483 | srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) |
484 | result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) | 484 | result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) |
485 | self.assertTrue(os.path.isfile(recipefile)) | 485 | 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 321d0ba257..502e1dfbc3 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py | |||
@@ -297,6 +297,11 @@ class PythonRecipeHandler(RecipeHandler): | |||
297 | value = ' '.join(str(v) for v in values if v) | 297 | value = ' '.join(str(v) for v in values if v) |
298 | 298 | ||
299 | bbvar = self.bbvar_map[field] | 299 | bbvar = self.bbvar_map[field] |
300 | if bbvar == "PN": | ||
301 | # by convention python recipes start with "python3-" | ||
302 | if not value.startswith('python'): | ||
303 | value = 'python3-' + value | ||
304 | |||
300 | if bbvar not in extravalues and value: | 305 | if bbvar not in extravalues and value: |
301 | extravalues[bbvar] = value | 306 | extravalues[bbvar] = value |
302 | 307 | ||