## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; 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 Name: python-typer Version: 0.9.0 Release: %autorelease Summary: Build great CLIs; easy to code; based on Python type hints # SPDX License: MIT URL: https://typer.tiangolo.com/ Source0: https://github.com/tiangolo/typer/archive/%{version}/typer-%{version}.tar.gz # Downstream-only: # Patch out linting/coverage from tests # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters Patch: 0001-Patch-out-linting-coverage-from-tests.patch BuildArch: noarch BuildRequires: python3-devel Obsoletes: python-typer-doc < 0.4.0-5 %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 3.6+ type hints. The key features are: • Intuitive to write: Great editor support. Completion everywhere. Less time debugging. Designed to be easy to use and learn. Less time reading docs. • Easy to use: It’s easy to use for the final users. Automatic help, and automatic completion for all shells. • Short: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs. • Start simple: The simplest example adds only 2 lines of code to your app: 1 import, 1 function call. • Grow large: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments. Typer is FastAPI’s little sibling. And it’s intended to be the FastAPI of CLIs.} %description %{common_description} %package -n python3-typer Summary: %{summary} %description -n python3-typer %{common_description} %pyproject_extras_subpkg -n python3-typer all %prep %autosetup -n typer-%{version} -p1 cp -p pyproject.toml pyproject.toml.bak # We have flit 3.x in Fedora 34 and later, so we must try to use it. sed -r -i 's/(flit_core[[:blank:]]*>=2[^,]*),<3\b/\1/' pyproject.toml # Loosen certain strict maximum versions; we must work with what we have sed -r -i 's/\b(pytest(-xdist)?)([[:blank:]]*>=[^,]*),[^"]+/\1\3/' pyproject.toml # Do not depend on pytest-sugar; it is not in EPEL9. sed -r -i 's/^([[:blank:]]*)"(pytest-sugar)/\1# "\2/' pyproject.toml # Remove bundled js-termynal 0.0.1; since we are not building documentation, we # do this very bluntly: rm -rvf docs/js docs/css %generate_buildrequires %pyproject_buildrequires -x all,test %build %pyproject_wheel %install %pyproject_install %pyproject_save_files typer %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 ./scripts/test-files.sh # Shell completion tests need us to be running under a supported shell, i.e. # bash rather than sh. Unfortunately, shell detection with shellingham is so # thorough we cannot fool it by any combination of: # - export SHELL=/bin/bash # - bash -c '%%pytest' # - %%check -p /bin/bash # so we must simply skip the affected tests. k="${k-}${k+ and }not test_show_completion" k="${k-}${k+ and }not test_install_completion" # 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 %files -n python3-typer -f %{pyproject_files} %license LICENSE %doc CONTRIBUTING.md %doc README.md %changelog * Fri May 12 2023 Benjamin A. Beasley - 0.9.0-4 - Revert "Work around no python-shellingham in EPEL9" * Fri May 12 2023 Benjamin A. Beasley - 0.9.0-3 - Work around no python-shellingham in EPEL9 - Do not build a python3-typer+all metapackage * Fri May 12 2023 Benjamin A. Beasley - 0.9.0-2 - Work around no python-pytest-sugar in EPEL9 * 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