diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc index bdcd658d98..56a5cf2f09 100644 --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc @@ -97,6 +97,7 @@ PTESTS_SLOW_META_PYTHON = "\ python3-pytest-localserver \ python3-scrypt \ python3-traitlets \ + python3-typer \ python3-yappi \ " diff --git a/meta-python/recipes-devtools/python/python3-typer/run-ptest b/meta-python/recipes-devtools/python/python3-typer/run-ptest new file mode 100644 index 0000000000..94b40789b1 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-typer/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh + +# Ignore the test_tutorial and test_completion. +# Because it needs the docs_src package what is not in Yocto. +# And the tests are not that useful for Yocto. +pytest --automake --ignore tests/test_tutorial --ignore tests/test_completion diff --git a/meta-python/recipes-devtools/python/python3-typer_0.12.3.bb b/meta-python/recipes-devtools/python/python3-typer_0.12.3.bb new file mode 100644 index 0000000000..cc8669c375 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-typer_0.12.3.bb @@ -0,0 +1,41 @@ +SUMMARY = "Typer, build great CLIs. Easy to code. Based on Python type hints." +DESCRIPTION = "\ + Typer is a library for building CLI applications that users will love using and developers will love creating. Based on Python type hints. \ + It's also a command line tool to run scripts, automatically converting them to CLI applications. \ +" +HOMEPAGE = "https://github.com/tiangolo/typer" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=173d405eb704b1499218013178722617" + +SRC_URI[sha256sum] = "49e73131481d804288ef62598d97a1ceef3058905aa536a1134f90891ba35482" + +inherit pypi python_setuptools_build_meta ptest + +DEPENDS += "\ + python3-pdm-backend-native \ + python3-pdm-native \ +" + +SRC_URI:append = " \ + file://run-ptest \ +" + +PYPI_PACKAGE = "typer" + +RDEPENDS:${PN} += "\ + python3-click \ + python3-shellingham \ +" + +RDEPENDS:${PN}-ptest += "\ + python3-coverage \ + python3-pytest \ + python3-typing-extensions \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} +