Blob Blame History Raw
%global         srcname     knack

# tests are enabled by default
%bcond_without  tests

Name:           python-%{srcname}
Version:        0.8.2
Release:        3%{?dist}
Summary:        A Command-Line Interface framework
License:        MIT
URL:  {srcname}
Source0:        %pypi_source

BuildArch:      noarch

BuildRequires:  python3-devel

%if %{with tests}
BuildRequires:  python3-argcomplete
BuildRequires:  python3-colorama
BuildRequires:  python3-jmespath
BuildRequires:  python3-pytest
BuildRequires:  python3-pyyaml
BuildRequires:  python3-tabulate

%global _description %{expand:
A Command-Line Interface framework}

%description %{_description}

%package -n python3-%{srcname}
Summary:        %{summary}

%description -n python3-%{srcname} %{_description}

%autosetup -n %{srcname}-%{version}

# Use unittest's mock that is built in for Python 3.x.
# Upstream PR made to fix this: (thanks, Ben!)
sed -i 's/^import mock/from unittest import mock/' tests/*.py



%if %{with tests}
# Skip the tests which require network connectivity.
%pytest -k "not test_server_with_path"

%files -n python3-%{srcname}
%license LICENSE
%doc README.rst

* Fri Jul 23 2021 Fedora Release Engineering <> - 0.8.2-3
- Rebuilt for

* Fri Jun 04 2021 Python Maint <> - 0.8.2-2
- Rebuilt for Python 3.10

* Tue Jun 01 2021 Major Hayden <> - 0.8.2-1
- First package.