| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| %{?!python_module:%define python_module() python-%{**} python3-%{**}} |
| %define skip_python2 1 |
| Name: python-typed-ast |
| Version: 1.4.1 |
| Release: 0 |
| Summary: A fork of Python 2 and 3 ast modules with type comment support |
| License: Apache-2.0 |
| Group: Development/Languages/Python |
| URL: https://github.com/python/typed_ast |
| Source0: https://files.pythonhosted.org/packages/source/t/typed_ast/typed_ast-%{version}.tar.gz |
| BuildRequires: %{python_module devel} |
| BuildRequires: %{python_module setuptools} |
| BuildRequires: fdupes |
| BuildRequires: python-rpm-macros |
| |
| BuildRequires: %{python_module pytest} |
| |
| %python_subpackages |
| |
| %description |
| typed_ast is a Python 3 package that provides a Python 2.7 and Python 3 |
| parser similar to the standard ast library. Unlike ast, the parsers in |
| typed_ast include PEP 484 type comments and are independent of the version of |
| Python under which they are run. The typed_ast parsers produce the standard |
| Python AST (plus type comments), and are both fast and correct, as they are |
| based on the CPython 2.7 and 3.6 parsers. |
| |
| %prep |
| %setup -q -n typed_ast-%{version} |
| |
| %build |
| export CFLAGS="%{optflags}" |
| %python_build |
| |
| %install |
| %python_install |
| %python_expand %fdupes %{buildroot}%{$python_sitearch} |
| |
| %check |
| |
| %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} |
| PYTHONDONTWRITEBYTECODE=1 |
| |
| py.test-%{$python_bin_suffix} -v -k 'not test_ignores and not test_convert_strs' |
| } |
| |
| %files %{python_files} |
| %license LICENSE |
| %doc README.md |
| %{python_sitearch}/* |
| |
| %changelog |