summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python
diff options
context:
space:
mode:
authorJan Vermaete <jan.vermaete@gmail.com>2024-06-16 23:30:20 +0200
committerKhem Raj <raj.khem@gmail.com>2024-06-16 15:54:04 -0700
commit9a9c0e6299fd774ac6a010793d3715444f82bc8f (patch)
treebf652b15461a3efe0b8a1a8941ecf6d3857db3f5 /meta-python/recipes-devtools/python
parentf6949e47758da001b69bae8da8b9493c81ed63a6 (diff)
downloadmeta-openembedded-9a9c0e6299fd774ac6a010793d3715444f82bc8f.tar.gz
python3-typer: add new recipe
root@qemux86-64:~# ptest-runner python3-typer START: ptest-runner 2024-06-16T21:26 BEGIN: /usr/lib/python3-typer/ptest PASS: tests/test_ambiguous_params.py:test_split_annotations_from_typer_annotations_simple PASS: tests/test_ambiguous_params.py:test_forbid_default_value_in_annotated_argument PASS: tests/test_ambiguous_params.py:test_allow_options_to_have_names PASS: tests/test_ambiguous_params.py:test_forbid_annotated_param_and_default_param[Argument-ArgumentInfo] PASS: tests/test_ambiguous_params.py:test_forbid_annotated_param_and_default_param[Option-OptionInfo] PASS: tests/test_ambiguous_params.py:test_forbid_multiple_typer_params_in_annotated PASS: tests/test_ambiguous_params.py:test_allow_multiple_non_typer_params_in_annotated PASS: tests/test_ambiguous_params.py:test_forbid_default_factory_and_default_value_in_annotated[Argument-ArgumentInfo] PASS: tests/test_ambiguous_params.py:test_forbid_default_factory_and_default_value_in_annotated[Option-OptionInfo] PASS: tests/test_ambiguous_params.py:test_allow_default_factory_with_default_param[Argument] PASS: tests/test_ambiguous_params.py:test_allow_default_factory_with_default_param[Option] PASS: tests/test_ambiguous_params.py:test_forbid_default_and_default_factory_with_default_param[Argument-ArgumentInfo] PASS: tests/test_ambiguous_params.py:test_forbid_default_and_default_factory_with_default_param[Option-OptionInfo] PASS: tests/test_ambiguous_params.py:test_error_rendering[error0-`Argument` default value cannot be set in `Annotated` for 'my_argument'. Set the default value with `=` instead.] PASS: tests/test_ambiguous_params.py:test_error_rendering[error1-Cannot specify `Option` in `Annotated` and `Argument` as a default value together for 'my_argument'] PASS: tests/test_ambiguous_params.py:test_error_rendering[error2-Cannot specify `Option` in `Annotated` and default value together for 'my_argument'] PASS: tests/test_ambiguous_params.py:test_error_rendering[error3-Cannot specify `Argument` in `Annotated` and default value together for 'my_argument'] PASS: tests/test_ambiguous_params.py:test_error_rendering[error4-Cannot specify multiple `Annotated` Typer arguments for 'my_argument'] PASS: tests/test_ambiguous_params.py:test_error_rendering[error5-Cannot specify `default_factory` and a default value together for `Option`] PASS: tests/test_annotated.py:test_annotated_argument_with_default PASS: tests/test_annotated.py:test_annotated_argument_in_string_type_with_default PASS: tests/test_annotated.py:test_annotated_argument_with_default_factory PASS: tests/test_annotated.py:test_annotated_option_with_argname_doesnt_mutate_multiple_calls PASS: tests/test_cli/test_app_other_name.py:test_script_help PASS: tests/test_cli/test_app_other_name.py:test_script PASS: tests/test_cli/test_completion_run.py:test_script_completion_run PASS: tests/test_cli/test_doc.py:test_doc PASS: tests/test_cli/test_doc.py:test_doc_output PASS: tests/test_cli/test_doc.py:test_doc_title_output PASS: tests/test_cli/test_doc.py:test_doc_not_existing PASS: tests/test_cli/test_doc.py:test_doc_no_typer PASS: tests/test_cli/test_doc.py:test_doc_file_not_existing PASS: tests/test_cli/test_empty_script.py:test_script_help PASS: tests/test_cli/test_func_other_name.py:test_script PASS: tests/test_cli/test_help.py:test_script_help PASS: tests/test_cli/test_help.py:test_not_python PASS: tests/test_cli/test_multi_app.py:test_script_help PASS: tests/test_cli/test_multi_app.py:test_script_app_non_existent PASS: tests/test_cli/test_multi_app.py:test_script_sub PASS: tests/test_cli/test_multi_app.py:test_script_top PASS: tests/test_cli/test_multi_app.py:test_script_sub_hello PASS: tests/test_cli/test_multi_app.py:test_script_sub_bye PASS: tests/test_cli/test_multi_app_cli.py:test_script_help PASS: tests/test_cli/test_multi_app_cli.py:test_script_sub PASS: tests/test_cli/test_multi_app_cli.py:test_script_top PASS: tests/test_cli/test_multi_app_cli.py:test_script_sub_hello PASS: tests/test_cli/test_multi_app_cli.py:test_script_sub_bye PASS: tests/test_cli/test_multi_app_sub.py:test_script_help PASS: tests/test_cli/test_multi_app_sub.py:test_script PASS: tests/test_cli/test_multi_func.py:test_help PASS: tests/test_cli/test_multi_func.py:test_script PASS: tests/test_cli/test_multi_func.py:test_script_func_non_existent PASS: tests/test_cli/test_multi_func.py:test_script_func_not_function PASS: tests/test_cli/test_multi_func.py:test_script_func PASS: tests/test_cli/test_not_python.py:test_not_python PASS: tests/test_cli/test_sub.py:test_script_hello PASS: tests/test_cli/test_sub.py:test_script_hello_name PASS: tests/test_cli/test_sub.py:test_script_hello_name_formal PASS: tests/test_cli/test_sub.py:test_script_bye PASS: tests/test_cli/test_sub.py:test_script_bye_friend PASS: tests/test_cli/test_sub.py:test_script_help PASS: tests/test_cli/test_sub.py:test_not_python PASS: tests/test_cli/test_sub_completion.py:test_script_completion_run PASS: tests/test_cli/test_sub_help.py:test_script_help PASS: tests/test_cli/test_version.py:test_script_help PASS: tests/test_compat/test_option_get_help.py:test_hidden_option PASS: tests/test_compat/test_option_get_help.py:test_hidden_option_no_rich PASS: tests/test_compat/test_option_get_help.py:test_coverage_call PASS: tests/test_compat/test_option_get_help.py:test_completion PASS: tests/test_exit_errors.py:test_eoferror PASS: tests/test_exit_errors.py:test_oserror PASS: tests/test_exit_errors.py:test_oserror_no_epipe PASS: tests/test_others.py:test_help_from_info PASS: tests/test_others.py:test_defaults_from_info PASS: tests/test_others.py:test_too_many_parsers PASS: tests/test_others.py:test_valid_parser_permutations PASS: tests/test_others.py:test_install_invalid_shell PASS: tests/test_others.py:test_callback_too_many_parameters PASS: tests/test_others.py:test_callback_2_untyped_parameters PASS: tests/test_others.py:test_callback_3_untyped_parameters PASS: tests/test_others.py:test_completion_untyped_parameters PASS: tests/test_others.py:test_completion_untyped_parameters_different_order_correct_names PASS: tests/test_others.py:test_autocompletion_too_many_parameters PASS: tests/test_others.py:test_forward_references PASS: tests/test_others.py:test_context_settings_inheritance_single_command PASS: tests/test_others.py:test_split_opt PASS: tests/test_prog_name.py:test_custom_prog_name PASS: tests/test_rich_utils.py:test_rich_utils_click_rewrapp PASS: tests/test_rich_utils.py:test_rich_help_no_commands PASS: tests/test_tracebacks.py:test_traceback_no_rich PASS: tests/test_tracebacks.py:test_traceback_no_rich_short_disable PASS: tests/test_tracebacks.py:test_unmodified_traceback PASS: tests/test_type_conversion.py:test_optional PASS: tests/test_type_conversion.py:test_optional_tuple PASS: tests/test_type_conversion.py:test_no_type PASS: tests/test_type_conversion.py:test_list_parameters_convert_to_lists[List0] PASS: tests/test_type_conversion.py:test_list_parameters_convert_to_lists[List1] PASS: tests/test_type_conversion.py:test_list_parameters_convert_to_lists[List2] PASS: tests/test_type_conversion.py:test_tuple_parameter_elements_are_converted_recursively[Tuple0] PASS: tests/test_type_conversion.py:test_tuple_parameter_elements_are_converted_recursively[Tuple1] PASS: tests/test_type_conversion.py:test_tuple_parameter_elements_are_converted_recursively[Tuple2] PASS: tests/test_type_conversion.py:test_tuple_parameter_elements_are_converted_recursively[Tuple3] PASS: tests/test_type_conversion.py:test_tuple_parameter_elements_are_converted_recursively[Tuple4] PASS: tests/test_type_conversion.py:test_custom_parse PASS: tests/test_type_conversion.py:test_custom_click_type ============================================================================ Testsuite summary DURATION: 203 END: /usr/lib/python3-typer/ptest 2024-06-16T21:29 STOP: ptest-runner TOTAL: 1 FAIL: 0 Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python')
-rw-r--r--meta-python/recipes-devtools/python/python3-typer/run-ptest6
-rw-r--r--meta-python/recipes-devtools/python/python3-typer_0.12.3.bb41
2 files changed, 47 insertions, 0 deletions
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 @@
1#!/bin/sh
2
3# Ignore the test_tutorial and test_completion.
4# Because it needs the docs_src package what is not in Yocto.
5# And the tests are not that useful for Yocto.
6pytest --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 @@
1SUMMARY = "Typer, build great CLIs. Easy to code. Based on Python type hints."
2DESCRIPTION = "\
3 Typer is a library for building CLI applications that users will love using and developers will love creating. Based on Python type hints. \
4 It's also a command line tool to run scripts, automatically converting them to CLI applications. \
5"
6HOMEPAGE = "https://github.com/tiangolo/typer"
7LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=173d405eb704b1499218013178722617"
9
10SRC_URI[sha256sum] = "49e73131481d804288ef62598d97a1ceef3058905aa536a1134f90891ba35482"
11
12inherit pypi python_setuptools_build_meta ptest
13
14DEPENDS += "\
15 python3-pdm-backend-native \
16 python3-pdm-native \
17"
18
19SRC_URI:append = " \
20 file://run-ptest \
21"
22
23PYPI_PACKAGE = "typer"
24
25RDEPENDS:${PN} += "\
26 python3-click \
27 python3-shellingham \
28"
29
30RDEPENDS:${PN}-ptest += "\
31 python3-coverage \
32 python3-pytest \
33 python3-typing-extensions \
34 python3-unittest-automake-output \
35"
36
37do_install_ptest() {
38 install -d ${D}${PTEST_PATH}/tests
39 cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
40}
41