From 01c487e9ca0353a9b28a69adc95b7db38efd19a76e91a4cd0501085979bf16ce Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 20 Nov 2024 17:26:51 +0000 Subject: [PATCH] - update to 0.13.1: * Remove Rich tags when showing completion text. * Render Rich markup as HTML in Markdown docs. * Support cp850 encoding for auto-completion in PowerShell. * Allow gettext translation of help message. * Fix printing HTML from Rich output. PR #1055 by @tiangolo. * Update markdown includes to use the new simpler format. PR - update to 0.13.0: * Handle `KeyboardInterrupt` separately from other exceptions. * Update `launch` to not print anything when opening urls. * Show help items in order of definition. * Fix equality check for custom classes. * Allow colon in zsh autocomplete values and descriptions. * Deprecate support for `is_flag` and `flag_value` parameters. * Remove unused functionality from `_typing.py` file. * Fix typo in function name `_make_rich_text`. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typer?expand=0&rev=36 --- .gitattributes | 23 +++++ .gitignore | 1 + python-typer-rpmlintrc | 5 ++ python-typer.changes | 192 +++++++++++++++++++++++++++++++++++++++++ python-typer.spec | 93 ++++++++++++++++++++ typer-0.12.3.tar.gz | 3 + typer-0.12.5.tar.gz | 3 + typer-0.13.1.tar.gz | 3 + 8 files changed, 323 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-typer-rpmlintrc create mode 100644 python-typer.changes create mode 100644 python-typer.spec create mode 100644 typer-0.12.3.tar.gz create mode 100644 typer-0.12.5.tar.gz create mode 100644 typer-0.13.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-typer-rpmlintrc b/python-typer-rpmlintrc new file mode 100644 index 0000000..f91f336 --- /dev/null +++ b/python-typer-rpmlintrc @@ -0,0 +1,5 @@ +# Upstream does not declare a dependency as it ships all files in both packages, +# which scarily works with pip unless you start uninstalling one of the two packages. +# We use files from python-typer-slim where they exist in both. Thus, we require +# the dependency although it is not there upstream. +addFilter("python\d+-typer.noarch: W: python-leftover-require python\d+-typer-slim") diff --git a/python-typer.changes b/python-typer.changes new file mode 100644 index 0000000..cc2e667 --- /dev/null +++ b/python-typer.changes @@ -0,0 +1,192 @@ +------------------------------------------------------------------- +Wed Nov 20 17:25:27 UTC 2024 - Dirk Müller + +- update to 0.13.1: + * Remove Rich tags when showing completion text. + * Render Rich markup as HTML in Markdown docs. + * Support cp850 encoding for auto-completion in PowerShell. + * Allow gettext translation of help message. + * Fix printing HTML from Rich output. PR #1055 by @tiangolo. + * Update markdown includes to use the new simpler format. PR +- update to 0.13.0: + * Handle `KeyboardInterrupt` separately from other + exceptions. + * Update `launch` to not print anything when opening urls. + * Show help items in order of definition. + * Fix equality check for custom classes. + * Allow colon in zsh autocomplete values and descriptions. + * Deprecate support for `is_flag` and `flag_value` + parameters. + * Remove unused functionality from `_typing.py` file. + * Fix typo in function name `_make_rich_text`. + +------------------------------------------------------------------- +Fri Sep 27 15:41:42 UTC 2024 - Matthias Bach - 0.12.5 + +- Switch PDM dependency from python3-pdm to python3-pdm-backend to + account for changes in that package's structure. + +------------------------------------------------------------------- +Thu Aug 29 17:42:57 UTC 2024 - Matthias Bach - 0.12.5 + +- Update to upstream version 0.12.5 + * Unify the width of the Rich console for help and errors. + * Improve assertion error message if a group is not a valid subclass. + * Ensure rich_markup_mode=None disables Rich formatting. + +------------------------------------------------------------------- +Sat Aug 17 08:05:30 UTC 2024 - Matthias Bach - 0.12.4 + +- Update to upstream version 0.12.4 + * Fix support for UnionType (e.g. str | None) with Python 3.11. + * Fix zsh autocompletion installation. + * Fix usage of Annotated with future annotations in Python 3.7+. + * Fix shell_complete not working for Arguments. + +------------------------------------------------------------------- +Fri Apr 12 15:28:57 UTC 2024 - Matthias Bach + +- Add conflict declaration with Erlang as both packages provide + /usr/bin/typer + +------------------------------------------------------------------- +Tue Apr 9 20:28:42 UTC 2024 - Matthias Bach - 0.12.3 + +- Update to upstream version 0.12.3 + * Fix Rich formatting with no commands. + * Improve column help display, ensure commands column width is + the same on all panels. + * Add support for an argument of type Optional[Tuple] and default + +------------------------------------------------------------------- +Sat Apr 6 13:05:09 UTC 2024 - Matthias Bach - 0.12.1 + +- Update to upstream version 0.12.1 + * The core functionality has been extracted into + python-typer-slim. + * The typer command is now provided as part of the main typer + package. + * Formerly optional dependencies required for full + functionality are now automatically installed. If they are not + required, the slim package can be used. +- Drop set-proper-pythonpath-for-tutorial-script-tests.patch as it + is now applied in python-typer-slim. + +------------------------------------------------------------------- +Fri Mar 29 09:29:31 UTC 2024 - Matthias Bach - 0.11.1 + +- Update to upstream version 0.10.1 + * Internal and dependency changes +- Fix missing requirement specification on + python-typing_extensions. + +------------------------------------------------------------------- +Mon Mar 25 21:08:07 UTC 2024 - Matthias Bach - 0.10.0 + +- Update to upstream version 0.10.0 + * Fix default value of None for CLI Parameters when the type is + list | None and the default value is None. + * Improve support for CLI translations using gettext. + * Fix evaluating stringified annotations in Python 3.10. + * Fix display of default value for Enum parameters inside of a + list, include docs and tests. + * Update type annotations for show_default parameter and update + docs for setting a "Custom default string". + * Add missing default_factory in Argument overloads. + * Fix preserving case in enum values. + +------------------------------------------------------------------- +Tue Oct 17 19:08:42 UTC 2023 - Matthias Bach - 0.9.0 + +- Fix sle15_python_module_python being on wrong line post spec + auto-format. + +------------------------------------------------------------------- +Tue Oct 17 06:59:59 UTC 2023 - Matthias Bach - 0.9.0 + +- add sle15_python_module_python + +------------------------------------------------------------------- +Sun May 7 14:47:17 UTC 2023 - Matthias Bach - 0.9.0 + +- Update to upstream version 0.9.0 + * Add support for PEP-593 Annotated for specifying options and + arguments. + * Add support for custom types and parsers. +- Drop patch run-subprocesses-with-correct-python.patch that got + included upstream. + +------------------------------------------------------------------- +Thu Jan 5 15:07:01 UTC 2023 - Matthias Bach - 0.7.0 + +- Adapt set-proper-pythonpath-for-tutorial-script-tests.patch to + also work for Python 3.11. + +------------------------------------------------------------------- +Sun Nov 6 19:35:15 UTC 2022 - Matthias Bach - 0.7.0 + +- Update to upstream version 0.7.0 + * Make typer.run() not add completion scripts by default, it only + makes sense in installed apps. + * Add support for Python 3.11. + +------------------------------------------------------------------- +Mon Jul 18 10:22:12 UTC 2022 - Matthias Bach - 0.6.1 + +- Update to upstream version 0.6.1 + * Adds deep integrations with Rich. If Rich is available, it will + be used to show the content from --help options, validation + errors, and even errors in apps. + * Support for Rich Markup and Markdown in docstrings, CLI + parameters, help, and epilog. + * Fix type conversion for List and Tuple. + * Fix context_settings for a Typer apps with a single command. + * Fix setting FORCE_TERMINAL with colors. +- Refreshed patches + +------------------------------------------------------------------- +Fri Jun 24 18:20:30 UTC 2022 - Matthias Bach - 0.4.1 + +- Add run-subprocesses-with-correct-python.patch to ensure tests + aren't accidentally running subprocesses using the wrong Python + version. +- Add set-proper-pythonpath-for-tutorial-script-tests.patch to fix + issue with build failing due to import failures. + +------------------------------------------------------------------- +Tue Jun 14 14:37:26 UTC 2022 - Matthias Bach - 0.4.1 + +- Update to upstream version 0.4.1 + * Fix import of get_terminal_size for Click 8.1.0 support. +- Switch from traditional setup.py installation to pyproject macros + as upstream no longer ships its setup.py compability wrapper. + +------------------------------------------------------------------- +Mon Aug 30 19:31:17 UTC 2021 - Matthias Bach - 0.4.0 + +- Update to upstream version 0.4.0 + * Add support for Click 8 while keeping compatibility with + Click 7. +- Remove basic-click8-compat.patch as Click 8 compatibility is now + provided upstream. + +------------------------------------------------------------------- +Fri Jul 23 18:56:14 UTC 2021 - Matthias Bach + +- Resolve Typer no longer working since Click got bumped to version + 8. + * This removes support for autocompletion. +- Add basic-click8-compat.patch + +------------------------------------------------------------------- +Wed Apr 14 16:06:14 UTC 2021 - Matthias Bach + +- Properly specify package group. +- Suppress false-positive detection of empty file in rpmlint. +- Properly declare minimum version requirement vs. python-click to + avoid broken installation on Leap. + +------------------------------------------------------------------- +Tue Apr 13 19:30:11 UTC 2021 - Matthias Bach - 0.3.2 + +- Initial package release diff --git a/python-typer.spec b/python-typer.spec new file mode 100644 index 0000000..8051e3b --- /dev/null +++ b/python-typer.spec @@ -0,0 +1,93 @@ +# +# spec file for package python-typer +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2021 Matthias Bach +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define plainpython python +%{?sle15_python_module_pythons} +Name: python-typer +Version: 0.13.1 +Release: 0 +Summary: Typer, build great CLIs. Easy to code. Based on Python type hints +License: MIT +Group: Development/Languages/Python +URL: https://github.com/tiangolo/typer +Source: https://files.pythonhosted.org/packages/source/t/typer/typer-%{version}.tar.gz +Source2: %{name}-rpmlintrc +BuildRequires: %{python_module pdm-backend} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module typer-slim} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# Work around Python dependency not being auto-added as there are no modules provided +Requires: %{plainpython}(abi) = %{python_version} +Requires: python-click +Requires: python-rich +Requires: python-shellingham +Requires: python-typer-slim >= %version +Requires: python-typing_extensions +Requires(post): update-alternatives +Requires(postun): update-alternatives +# both packages provide /usr/bin/typer +Conflicts: erlang +BuildArch: noarch +%python_subpackages + +%description +Typer is a library for building CLI applications based on Python 3.6+ type hints. + +Based on type hints, Typer enables great editor support and completion for developers. +With automatic help and completion, Typer makes CLIs easy to use for users. + +This package provides the Typer Python package and ensures all dependencies required +for full functionality are provided. In addition, it provides the command "typer" +which allows users to run scripts not using typer with the same command line comfort +as those that do. + +%prep +%setup -q -n typer-%{version} +%autopatch -p1 + +%build +%pyproject_wheel + +%install +%pyproject_install + +# Remove files that were already installed by typer-slim +%python_expand rm -r %{buildroot}%{$python_sitelib}/typer + +%python_clone -a %{buildroot}/%{_bindir}/typer + +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# There are no tests in the python package as it only pulls dependencies + +%post +%python_install_alternative typer + +%postun +%python_uninstall_alternative typer + +%files %{python_files} +%doc README.md +%license LICENSE +%python_alternative %{_bindir}/typer +%{python_sitelib}/typer-%{version}*-info + +%changelog diff --git a/typer-0.12.3.tar.gz b/typer-0.12.3.tar.gz new file mode 100644 index 0000000..02b64b1 --- /dev/null +++ b/typer-0.12.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49e73131481d804288ef62598d97a1ceef3058905aa536a1134f90891ba35482 +size 94276 diff --git a/typer-0.12.5.tar.gz b/typer-0.12.5.tar.gz new file mode 100644 index 0000000..94c961d --- /dev/null +++ b/typer-0.12.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f592f089bedcc8ec1b974125d64851029c3b1af145f04aca64d69410f0c9b722 +size 98953 diff --git a/typer-0.13.1.tar.gz b/typer-0.13.1.tar.gz new file mode 100644 index 0000000..599995c --- /dev/null +++ b/typer-0.13.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d444cb96cc268ce6f8b94e13b4335084cef4c079998a9f4851a90229a3bd25c +size 98631