## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; 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 # tests are enabled by default %bcond_without tests %global srcname knack %global forgeurl https://github.com/microsoft/knack Version: 0.9.0 Epoch: 1 %global tag v%{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: A Command-Line Interface framework License: MIT URL: %forgeurl Source0: %forgesource BuildArch: noarch BuildRequires: python3-devel %if %{with tests} BuildRequires: python3dist(pytest) %endif %global _description %{expand: A Command-Line Interface framework} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %forgeautosetup -p1 # Use unittest's mock that is built in for Python 3.x. # Upstream PR made to fix this: (thanks, Ben!) # https://github.com/microsoft/knack/pull/248 sed -i 's/^import mock/from unittest import mock/' tests/*.py %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel %install %pyproject_install %pyproject_save_files knack %if %{with tests} %check # Skip the tests which require network connectivity. %pytest --disable-warnings -k "not test_server_with_path" %endif %files -n python3-%{srcname} -f %{pyproject_files} %doc *.rst %changelog * mer. déc. 15 2021 Major Hayden 1:0.9.0-1 - Update to 0.9.0 * mar. nov. 09 2021 Major Hayden 1:0.8.2-1 - Revert to 0.8.2 * mar. nov. 09 2021 Major Hayden 0.8.2-1 - Revert "Update to 0.8.3" * jeu. nov. 04 2021 Major Hayden 0.8.3-1 - Update to 0.8.3 * ven. juil. 23 2021 Fedora Release Engineering 0.8.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * ven. juin 04 2021 Python Maint 0.8.2-3 - Rebuilt for Python 3.10 * jeu. juin 03 2021 Major Hayden 0.8.2-2 - Update README * jeu. juin 03 2021 Major Hayden 0.8.2-1 - Initial package (#1966722)