## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 8; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec %global srcname typer %global forgeurl https://github.com/tiangolo/typer %global tag %{version} Name: python-typer Version: 0.4.0 %forgemeta Release: %autorelease Summary: Build great CLIs; easy to code; based on Python type hints License: MIT URL: https://typer.tiangolo.com/ Source0: %{forgesource} 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 %forgeautosetup # We must loosen up some strict dependencies to accommodate the versions that # are packaged. This is always a little risky, but fortunately it affects # build and test dependencies rather than runtime ones. # # 1. We have flit 3.x in Fedora 34 and later, so we must try to use it. # 2. Filter out formatter/linter/coverage tools that we will not actually use # from the test extra requirements; we would not bother, except that many # have very strict version pins that we will not be able to satisfy. # 3. Loosen certain test version pins as well; we must work with what we # have. We allow some to be newer. sed -r -i \ -e 's/(flit_core[[:blank:]]*>=2[^,]*),<3\b/\1/' \ -e '/\b(mypy|black|isort|pytest-cov)[[:blank:]]*[>=]=/d' \ -e 's/\b(pytest(-xdist)?|coverage)([[:blank:]]*>=[^,]*),[^"]+/\1\3/' \ 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). ./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. %pytest -k 'not test_show_completion and not test_install_completion' %files -n python3-typer -f %{pyproject_files} %license LICENSE %doc CONTRIBUTING.md %doc README.md %changelog * mer. déc. 15 2021 Benjamin A. Beasley 0.4.0-8 - Allow newer python-coverage, i.e., >=6.0 * mar. oct. 19 2021 Benjamin A. Beasley 0.4.0-7 - Drop pytest-cov BR * mar. sept. 28 2021 Benjamin A. Beasley 0.4.0-6 - Drop the documentation subpackage entirely. * lun. sept. 13 2021 Benjamin A. Beasley 0.4.0-5 - Revert "Let pyproject-rpm-macros handle the license file" * lun. sept. 13 2021 Benjamin A. Beasley 0.4.0-4 - Drop BR on pyproject-rpm-macros, now implied by python3-devel * lun. sept. 13 2021 Benjamin A. Beasley 0.4.0-3 - Let pyproject-rpm-macros handle the license file * lun. sept. 13 2021 Benjamin A. Beasley 0.4.0-2 - Reduce macro indirection in the spec file * mar. août 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