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>
This commit is contained in:
Jan Vermaete 2024-06-16 23:30:20 +02:00 committed by Khem Raj
parent f6949e4775
commit 9a9c0e6299
No known key found for this signature in database
GPG Key ID: BB053355919D3314
3 changed files with 48 additions and 0 deletions

View File

@ -97,6 +97,7 @@ PTESTS_SLOW_META_PYTHON = "\
python3-pytest-localserver \
python3-scrypt \
python3-traitlets \
python3-typer \
python3-yappi \
"

View File

@ -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

View File

@ -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/
}