OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typed-ast?expand=0&rev=3
63 lines
2.0 KiB
RPMSpec
63 lines
2.0 KiB
RPMSpec
#
|
|
# spec file for package python-typed-ast
|
|
#
|
|
# Copyright (c) 2017 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
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%bcond_without test
|
|
Name: python-typed-ast
|
|
Version: 1.0.4
|
|
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
|
|
Source: https://files.pythonhosted.org/packages/source/t/typed-ast/typed-ast-%{version}.tar.gz
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: python-rpm-macros
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%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}"
|
|
%undefine have_python2
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
|
|
%files %{python_files}
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE
|
|
%{python_sitearch}/*
|
|
|
|
%changelog
|