Blob Blame History Raw
%global srcname MonkeyType

Name:           monkeytype
Version:        22.2.0
Release:        %autorelease
Summary:        Generating Python type annotations from sampled production types
License:        BSD
URL:  {srcname}
# PyPI source has no tests
# Source:        %%{pypi_source %%{srcname}}
Source:         %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
# Fix for Python 3.11's changes to handling of Tuple[()]
# based on
Patch:          fix-py311-emptytuple.diff
# skip test_generator_trace
# see
Patch:          skip-test-generator-trace-py311.diff

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
# Pipfile not supported yet
# Test dependencies:
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(django)

%py_provides python%{python3_pkgversion}-%{name}

%global _description %{expand:
MonkeyType collects runtime types of function arguments and return values, and
can automatically generate stub files or even add draft type annotations
directly to your Python code based on the types collected at runtime.}

%description %{_description}

%autosetup -p1 -n %{srcname}-%{version}
# we don't care about coverage checks
rm pytest.ini

%pyproject_buildrequires -r


%pyproject_save_files %{name}


%files -f %{pyproject_files}
%license LICENSE