summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2024-02-19 09:30:24 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-20 11:39:45 +0000
commit9f7475b4e5219da89f04c21a96d54e76fc6a6960 (patch)
tree70d7f1dd96d7c96fb8e17a0531d784548fba74d1 /meta/lib/oeqa
parenta7484a66b42b8b0eaf3336272827f0bd10668685 (diff)
downloadpoky-9f7475b4e5219da89f04c21a96d54e76fc6a6960.tar.gz
recipetool; add support for python_mesonpy class
* Add support to detect the "mesonpy" build-backend for recipetool create. * Add oe-selftest case for creating a recipe for "siphash24" from pypi. https://pypi.org/project/siphash24/ This is by far the simplest recipe using the mesonpy build backend. Upstream does not provide LICENSE file(s) and we do not detect the LICENSE so don't check for that result in the test. Likewise, upstream does not define HOMEPAGE, so skip that result. (From OE-Core rev: 256749322671d2f4ea994db671d73c4de10e1723) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index 83361814df..2eca1800de 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -676,6 +676,25 @@ class RecipetoolCreateTests(RecipetoolBase):
676 676
677 self._test_recipe_contents(recipefile, checkvars, inherits) 677 self._test_recipe_contents(recipefile, checkvars, inherits)
678 678
679 def test_recipetool_create_python3_pep517_mesonpy(self):
680 # This test require python 3.11 or above for the tomllib module or tomli module to be installed
681 needTomllib(self)
682
683 # Test creating python3 package from tarball (using mesonpy class)
684 temprecipe = os.path.join(self.tempdir, 'recipe')
685 os.makedirs(temprecipe)
686 pn = 'siphash24'
687 pv = '1.4'
688 recipefile = os.path.join(temprecipe, 'python3-%s_%s.bb' % (pn, pv))
689 srcuri = 'https://files.pythonhosted.org/packages/c2/32/b934a70592f314afcfa86c7f7e388804a8061be65b822e2aa07e573b6477/%s-%s.tar.gz' % (pn, pv)
690 result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
691 self.assertTrue(os.path.isfile(recipefile))
692 checkvars = {}
693 checkvars['SRC_URI[sha256sum]'] = '7fd65e39b2a7c8c4ddc3a168a687f4610751b0ac2ebb518783c0cdfc30bec4a0'
694 inherits = ['python_mesonpy', 'pypi']
695
696 self._test_recipe_contents(recipefile, checkvars, inherits)
697
679 def test_recipetool_create_github_tarball(self): 698 def test_recipetool_create_github_tarball(self):
680 # Basic test to ensure github URL mangling doesn't apply to release tarballs. 699 # Basic test to ensure github URL mangling doesn't apply to release tarballs.
681 # Deliberately use an older release of Meson at present so we don't need a toml parser. 700 # Deliberately use an older release of Meson at present so we don't need a toml parser.