## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # This package corresponds to three PyPI projects (typer-slim, typer, # typer-cli) all co-developed in one repository. Since the three are versioned # identically and released at the same time, it makes sense to build them from # a single source package. Name: python-typer Version: 0.13.0 Release: %autorelease Summary: Build great CLIs; easy to code; based on Python type hints # SPDX License: MIT URL: https://typer.tiangolo.com/ %global forgeurl https://github.com/tiangolo/typer Source0: %{forgeurl}/archive/%{version}/typer-%{version}.tar.gz # Hand-written for Fedora in groff_man(7) format based on typer --help. Source10: typer.1 # To get help text for # typer [PATH_OR_MODULE] utils --help # first create empty file x.py, then run: # PYTHONPATH="${PWD}" typer x utils --help. Source11: typer-utils.1 # …and similarly, # PYTHONPATH="${PWD}" typer x utils docs --help. Source12: typer-utils-docs.1 BuildArch: noarch BuildRequires: python3-devel # Since requirements-tests.txt contains overly-strict version bounds and many # unwanted linting/coverage/typechecking/formatting dependencies # (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters), # we just list the few test dependencies we *do* want manually rather than # trying to patch the requirements file. We preserve upstream’s lower bounds # but remove upper bounds, as we must try to make do with what we have. BuildRequires: %{py3_dist pytest} >= 4.4 BuildRequires: %{py3_dist pytest-xdist} >= 1.32 # As much as possible, we patch out linters, coverage tools, and typecheckers # (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters), # but there are dozens of tests that explicitly run scripts indirectly via the # coverage module, and patching all of these tests correctly has become # onerous. BuildRequires: %{py3_dist coverage[toml]} >= 6.2 %global common_description %{expand: Typer is a library for building CLI applications that users will love using and developers will love creating. Based on Python type hints. Typer CLI This package, typer-cli, only provides a command typer in the shell with the same functionality of python -m typer. The only reason why this is a separate package is to allow developers to opt out of the typer command by installing typer-slim, that doesn’t include typer-cli.} %description %{common_description} %package -n python3-typer-slim Summary: %{summary} # Introduced in F41 Obsoletes: python3-typer < 0.12.1-1 Conflicts: python3-typer < 0.12.1-1 %description -n python3-typer-slim %{common_description} %package -n python3-typer Summary: %{summary} # https://docs.fedoraproject.org/en-US/packaging-guidelines/#_requiring_base_package Requires: python3-typer-cli = %{version}-%{release} Requires: python3-typer-slim = %{version}-%{release} %description -n python3-typer %{common_description} %package -n python3-typer-cli Summary: %{summary} # https://docs.fedoraproject.org/en-US/packaging-guidelines/#_requiring_base_package Requires: python3-typer-slim = %{version}-%{release} %description -n python3-typer-cli %{common_description} %pyproject_extras_subpkg -n python3-typer-slim -i %{python3_sitelib}/typer_slim-%{version}.dist-info standard %prep %autosetup -n typer-%{version} -p1 %generate_buildrequires export TIANGOLO_BUILD_PACKAGE='typer-slim' %pyproject_buildrequires -x standard ( export TIANGOLO_BUILD_PACKAGE='typer' %pyproject_buildrequires ) | grep -vE '\btyper\b' ( export TIANGOLO_BUILD_PACKAGE='typer-cli' %pyproject_buildrequires ) | grep -vE '\btyper\b' %build export TIANGOLO_BUILD_PACKAGE='typer-slim' %pyproject_wheel export TIANGOLO_BUILD_PACKAGE='typer' %pyproject_wheel export TIANGOLO_BUILD_PACKAGE='typer-cli' %pyproject_wheel %install %pyproject_install install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 \ '%{SOURCE10}' '%{SOURCE11}' '%{SOURCE12}' install -d \ '%{buildroot}%{bash_completions_dir}' \ '%{buildroot}%{zsh_completions_dir}' \ '%{buildroot}%{fish_completions_dir}' export PYTHONPATH='%{buildroot}%{python3_sitelib}' export _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1 '%{buildroot}%{_bindir}/typer' --show-completion bash \ > '%{buildroot}%{bash_completions_dir}/typer' '%{buildroot}%{_bindir}/typer' --show-completion zsh \ > '%{buildroot}%{zsh_completions_dir}/_typer' '%{buildroot}%{_bindir}/typer' --show-completion fish \ > '%{buildroot}%{fish_completions_dir}/typer.fish' %check # See scripts/test.sh. We do not run the linters (scripts/lint.sh, i.e., # mypy/black/isort). export TERMINAL_WIDTH=3000 export _TYPER_FORCE_DISABLE_TERMINAL=1 export _TYPER_RUN_INSTALL_COMPLETION_TESTS=1 # These cannot find the typer package because the tests override PYTHONPATH. ignore="${ignore-} --ignore=tests/test_tutorial/test_subcommands/test_tutorial001.py" ignore="${ignore-} --ignore=tests/test_tutorial/test_subcommands/test_tutorial003.py" %pytest -k "${k-}" ${ignore-} -n auto -v -rs %files -n python3-typer-slim %license LICENSE %doc README.md %doc docs/release-notes.md %{python3_sitelib}/typer/ %{python3_sitelib}/typer_slim-%{version}.dist-info/ %files -n python3-typer %{python3_sitelib}/typer-%{version}.dist-info/ %files -n python3-typer-cli %{python3_sitelib}/typer_cli-%{version}.dist-info/ %{_bindir}/typer %{_mandir}/man1/typer*.1* %{bash_completions_dir}/typer %{zsh_completions_dir}/_typer %{fish_completions_dir}/typer.fish %changelog ## START: Generated by rpmautospec * Sun Nov 10 2024 Benjamin A. Beasley - 0.13.0-2 - No longer skip the shell completion tests - These are now more adaptable to different environments and do not fail * Sun Nov 10 2024 Benjamin A. Beasley - 0.13.0-1 - Update to 0.13.0 (close RHBZ#2324487) * Sat Aug 24 2024 Benjamin A. Beasley - 0.12.5-1 - Update to 0.12.5 (close RHBZ#2307757) * Sat Aug 24 2024 Benjamin A. Beasley - 0.12.4-2 - Package the release notes alongside the README * Wed Aug 21 2024 Benjamin A. Beasley - 0.12.4-1 - Update to 0.12.4 (close RHBZ#2306098) * Fri Jul 19 2024 Fedora Release Engineering - 0.12.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sun Jun 09 2024 Python Maint - 0.12.3-3 - Rebuilt for Python 3.13 * Fri Apr 12 2024 Benjamin A. Beasley - 0.12.3-1 - Update to 0.12.3 (close RHBZ#2272276) * Fri Apr 12 2024 Benjamin A. Beasley - 0.12.2-1 - Update to 0.12.2 * Mon Apr 08 2024 Benjamin A. Beasley - 0.12.1-1 - Update to 0.12.1 - Now encompasses the typer, typer-slim, and typer-cli PyPI packages. * Thu Apr 04 2024 Benjamin A. Beasley - 0.11.1-4 - Switch from the PyPI sdist to the GitHub archive * Wed Apr 03 2024 Benjamin A. Beasley - 0.11.1-3 - Remove an Obsoletes that has served its upgrade-path purpose * Fri Mar 29 2024 Benjamin A. Beasley - 0.11.1-2 - Add missing source * Fri Mar 29 2024 Benjamin A. Beasley - 0.11.1-1 - Update to 0.11.1 (close RHBZ#2272130) - Build from the PyPI sdist, now that it contains tests * Wed Mar 27 2024 Benjamin A. Beasley - 0.11.0-1 - Update to 0.11.0 (close RHBZ#2271198) * Wed Mar 27 2024 Benjamin A. Beasley - 0.10.0-1 - Update to 0.10.0 * Wed Mar 27 2024 Benjamin A. Beasley - 0.9.4-1 - Update to 0.9.4 * Wed Mar 27 2024 Benjamin A. Beasley - 0.9.3-1 - Update to 0.9.3 * Wed Mar 27 2024 Benjamin A. Beasley - 0.9.2-1 - Update to 0.9.2 - Give up on patching out the dependency on the coverage module * Wed Mar 27 2024 Benjamin A. Beasley - 0.9.1-1 - Update to 0.9.1 - New CITATION.cff file is packaged as documentation. * Wed Mar 27 2024 Benjamin A. Beasley - 0.9.0-9 - Simplify patching pyproject.toml and handling test dependencies - Drop unnecessary version-bounded BuildRequires on python-pytest-sugar, fixing failure to build from source with python-pytest-sugar 1.0.0. * Fri Jan 26 2024 Fedora Release Engineering - 0.9.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.9.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jun 29 2023 Python Maint - 0.9.0-3 - Rebuilt for Python 3.12 * Tue May 02 2023 Benjamin A. Beasley - 0.9.0-1 - Update to 0.9.0 (close RHBZ#2192484) * Mon May 01 2023 Benjamin A. Beasley - 0.8.0-1 - Update to 0.8.0 (close RHBZ#2192330) * Fri Jan 20 2023 Fedora Release Engineering - 0.7.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Jan 03 2023 Benjamin A. Beasley - 0.7.0-4 - Allow rich 13.x (fix RHBZ#2157866) * Wed Dec 21 2022 Benjamin A. Beasley - 0.7.0-3 - Rely on PYTEST_XDIST_AUTO_NUM_WORKERS * Sat Nov 12 2022 Benjamin A. Beasley - 0.7.0-2 - Add some environment variables from scripts/test.sh * Sun Nov 06 2022 Benjamin A. Beasley - 0.7.0-1 - Update to 0.7.0 (close RHBZ#2140338) * Sun Nov 06 2022 Benjamin A. Beasley - 0.6.1-3 - Confirm License is SPDX MIT * Fri Jul 22 2022 Fedora Release Engineering - 0.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jul 13 2022 Benjamin A. Beasley - 0.6.1-1 - Update to 0.6.1 (close RHBZ#2106487) * Wed Jul 13 2022 Benjamin A. Beasley - 0.5.0-2 - Run tests in parallel with pytest-xdist * Wed Jul 06 2022 Benjamin A. Beasley - 0.5.0-1 - Update to 0.5.0 (close RHBZ#2103375) * Tue Jun 14 2022 Python Maint - 0.4.1-3 - Rebuilt for Python 3.11 * Fri Apr 22 2022 Benjamin A. Beasley - 0.4.1-2 - Patch out coverage analysis * Thu Mar 31 2022 Benjamin A. Beasley - 0.4.1-1 - Update to 0.4.1 (close RHBZ#2070317) * Fri Jan 21 2022 Fedora Release Engineering - 0.4.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Dec 15 2021 Benjamin A. Beasley - 0.4.0-8 - Allow newer python-coverage, i.e., >=6.0 * Tue Oct 19 2021 Benjamin A. Beasley - 0.4.0-7 - Drop pytest-cov BR * Tue Sep 28 2021 Benjamin A. Beasley - 0.4.0-6 - Drop the documentation subpackage entirely. * Mon Sep 13 2021 Benjamin A. Beasley - 0.4.0-5 - Revert "Let pyproject-rpm-macros handle the license file" * Mon Sep 13 2021 Benjamin A. Beasley - 0.4.0-4 - Drop BR on pyproject-rpm-macros, now implied by python3-devel * Mon Sep 13 2021 Benjamin A. Beasley - 0.4.0-3 - Let pyproject-rpm-macros handle the license file * Mon Sep 13 2021 Benjamin A. Beasley - 0.4.0-2 - Reduce macro indirection in the spec file * Tue Aug 31 2021 Benjamin A. Beasley - 0.4.0-1 - Update to 0.4.0 (fix RHBZ#1977513) * Wed Jun 30 2021 Benjamin A. Beasley - 0.3.2-4 - Remove reference to bug for out-of-date mkdocs-material * Thu Jun 17 2021 Benjamin A. Beasley - 0.3.2-3 - Drop documentation dependency on mkdocs-material (RHBZ#1960274, comment 3) * Wed May 26 2021 Benjamin A. Beasley - 0.3.2-2 - Unbundle js-termynal * Tue May 25 2021 Benjamin A. Beasley - 0.3.2-1 - Initial package ## END: Generated by rpmautospec