File mypy.spec of Package mypy
#
# spec file for package mypy
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define skip_python2 1
%if %python3_version_nodots < 34
%define skip_python3 1
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: mypy
Version: 0.590
Release: 0
Summary: Optional static typing for Python
License: MIT
Group: Development/Languages/Python
Url: http://www.mypy-lang.org/
Source: https://files.pythonhosted.org/packages/source/m/mypy/mypy-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION docs
BuildRequires: %{python_module Sphinx >= 1.4.4}
BuildRequires: %{python_module sphinx_rtd_theme >= 0.1.9}
# /SECTION
Requires: python-typed-ast >= 1.0.3
Provides: mypy
BuildArch: noarch
%python_subpackages
%description
Mypy is an optional static type checker for Python that aims to
combine the benefits of both dynamic (or "duck") typing as well as
static typing.
Mypy type checks standard Python programs. It can catch many
programming errors by analyzing programs without having to run them.
There is basically no runtime overhead when run using any Python VM.
Mypy's type system features type inference, gradual typing, generics
and union types.
%prep
%setup -q -n mypy-%{version}
%build
rm -r typeshed/tests/
%python_build
pushd docs
make html
rm build/html/.buildinfo
popd
%install
%python_install
%python_expand %fdupes %{buildroot}
%files %{python_files}
%doc docs/README.md docs/build/html/
%license LICENSE
%{python_sitelib}/*
%{_bindir}/dmypy
%{_bindir}/mypy
%{_bindir}/stubgen
%{_libexecdir}/mypy
%changelog