Blame python3-mypy.spec

944aebd
%global checkout cd96f02
4be7ba4
4be7ba4
Name:           python3-mypy
4be7ba4
# Last actual version was 0.2.0, which is 7805b2c, continues as 0.2.0_dev
4be7ba4
Version:        0.2.0
944aebd
Release:        1.dev20160111git%{?dist}
4be7ba4
Summary:        A static type checker for Python
4be7ba4
%{?python_provide:%python_provide python3-mypy}
4be7ba4
4be7ba4
# The files under lib-python and lib-typing/3.2 are Python-licensed, but this
4be7ba4
# package does not include those files
4be7ba4
License:        MIT
4be7ba4
URL:            https://github.com/JukkaL/mypy
944aebd
# git archive --prefix=mypy-0.2.0-cd96f02/ cd96f02 | gzip -c9 > mypy-0.2.0-cd96f02.tar.gz
4be7ba4
Source0:        mypy-%{version}-%{checkout}.tar.gz
4be7ba4
4be7ba4
# The bundled typing.py is not needed with python 3.5
4be7ba4
Patch0:         0001-Do-not-install-typing.py.patch
4be7ba4
4be7ba4
# Change the search for data_dir to use Fedora's typeshed package instead of a
4be7ba4
# bundled version
4be7ba4
Patch1:         0002-Look-for-typeshed-in-usr-share.patch
4be7ba4
5a12ad0
# From https://github.com/JukkaL/mypy/issues/1095#issuecomment-166725598
5a12ad0
Patch2:         0003-Fix-1095.-Look-for-the-keyword-type-in-the-right-pla.patch
5a12ad0
c440ca5
# patch 2 breaks the data dir lookup when called as /bin/mypy instead of /usr/bin/mypy
c440ca5
Patch3:         0004-Canonicalize-bin_dir-when-looking-for-data_dir.patch
c440ca5
4be7ba4
BuildRequires:  python3-devel
4be7ba4
4be7ba4
# Needed to generate the man pages
4be7ba4
BuildRequires:  help2man
4be7ba4
4be7ba4
Requires:       python-typeshed
4be7ba4
4be7ba4
BuildArch:      noarch
4be7ba4
4be7ba4
%description
4be7ba4
Mypy is an optional static type checker for Python.  You can add type
4be7ba4
hints to your Python programs using the upcoming standard for type
4be7ba4
annotations introduced in Python 3.5 beta 1 (PEP 484), and use mypy to
4be7ba4
type check them statically. Find bugs in your programs without even
4be7ba4
running them!
4be7ba4
4be7ba4
%prep
4be7ba4
%autosetup -n mypy-%{version}-%{checkout} -p1
4be7ba4
893c17e
%build
893c17e
%py3_build
4be7ba4
4be7ba4
%install
4be7ba4
%py3_install
4be7ba4
4be7ba4
# Generate man pages
4be7ba4
mkdir -p %{buildroot}%{_mandir}/man1
4be7ba4
PYTHONPATH=%{buildroot}%{python3_sitelib} \
4be7ba4
    help2man --no-info --version-string 'mypy %{version}-dev' \
4be7ba4
        --no-discard-stderr -o %{buildroot}%{_mandir}/man1/mypy.1 \
4be7ba4
        %{buildroot}%{_bindir}/mypy
4be7ba4
4be7ba4
PYTHONPATH=%{buildroot}%{python3_sitelib} \
4be7ba4
    help2man --no-info --version-string 'mypy stubgen %{version}-dev' \
4be7ba4
        --no-discard-stderr -o %{buildroot}%{_mandir}/man1/stubgen.1 \
4be7ba4
        %{buildroot}%{_bindir}/stubgen
4be7ba4
4be7ba4
%files
4be7ba4
%doc README.md CREDITS
4be7ba4
%license LICENSE
4be7ba4
%{python3_sitelib}/mypy
4be7ba4
%{python3_sitelib}/mypy_lang-*.egg-info
4be7ba4
%{_bindir}/mypy
4be7ba4
%{_bindir}/stubgen
4be7ba4
%{_mandir}/man1/mypy.1*
4be7ba4
%{_mandir}/man1/stubgen.1*
4be7ba4
# distutils insists on putting data_files in /usr/lib, so just go with it
4be7ba4
%{_prefix}/lib/mypy
4be7ba4
4be7ba4
%changelog
944aebd
* Mon Jan 11 2016 David Shea <dshea@redhat.com> - 0.2.0-1.dev20160111git
944aebd
- Add support for more kinds of function redefinition
944aebd
- Allow conditionally assigning None to a module
944aebd
- Support conditionally defined nested functions
944aebd
- Tighten argument type for Instance(erased=...) from Any to bool.
944aebd
- Reformat a few messages so they are easier to find using grep.
944aebd
- Update README.md to fix installation instructions for Python 3.5
944aebd
c440ca5
* Thu Jan  7 2016 David Shea <dshea@redhat.com> - 0.2.0-1.dev20160104git.1
c440ca5
- Fix a bug in the discovery of the typeshed files
c440ca5
5a12ad0
* Mon Jan  4 2016 David Shea <dshea@redhat.com> - 0.2.0-1.dev20160104git
5a12ad0
- Don't check git submodule in subprocesses.
5a12ad0
- Improve check for "# type: ignore".
5a12ad0
- Add --pdb flag to drop into pdb upon fatal error.
5a12ad0
- Don't report internal error when using a name that could not be imported.
5a12ad0
- Write type-checking errors to stdout. Make usage() more complete.
5a12ad0
- Avoid ever relying on a not-yet-initialized MRO
5a12ad0
- When comparing template to actual arg types, stop at shortest.
5a12ad0
- Be more clever about finding a Python 2 interpreter
5a12ad0
- Basic support for partial 'None' types
5a12ad0
- Handle multiple None initializers
5a12ad0
- Remove redundant annotations
5a12ad0
- Partial type improvements
5a12ad0
- Allow assignments to function definitions
5a12ad0
- Document --pdb option.
5a12ad0
- Look for the keyword type in the right place.
5a12ad0
893c17e
* Mon Dec 21 2015 David Shea <dshea@redhat.com> - 0.2.0-1.dev20151220git
893c17e
- Fix an internal error when updating a partial type from an outer scope
893c17e
4be7ba4
* Thu Dec 17 2015 David Shea <dshea@redhat.com> - 0.2.0-1.dev20151217git
4be7ba4
- Initial package