python-astroid/python-astroid.spec

91 lines
3.1 KiB
RPMSpec

#
# spec file for package python-astroid
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-astroid
Version: 1.4.9.git.1489768950.31f21cd
Release: 0
Summary: Rebuild a new abstract syntax tree from Python's ast
License: LGPL-2.1+
Group: Development/Libraries/Python
Url: https://github.com/pycqa/astroid
# replaced for github pre-release
#Source: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz
Source: astroid-%{version}.tar.gz
Source1: pytest.ini
BuildRequires: %{python_module lazy-object-proxy}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module wrapt}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python2-backports.functools_lru_cache
BuildRequires: python2-enum34
BuildRequires: python2-singledispatch
Requires: python-lazy-object-proxy
Requires: python-six
Requires: python-wrapt
%ifpython2
Requires: python-backports.functools_lru_cache
Requires: python-enum34
Requires: python-singledispatch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
The aim of this module is to provide a common base representation of
python source code for projects such as pychecker, pyreverse,
pylint... Well, actually the development of this library is
essentially governed by pylint's needs. It used to be called
logilab-astng.
It provides a compatible representation which comes from the _ast
module. It rebuilds the tree generated by the builtin _ast module by
recursively walking down the AST and building an extended ast. The new
node classes have additional methods and attributes for different
usages. They include some support for static inference and local name
scopes. Furthermore, astroid builds partial trees by inspecting living
objects.
%prep
%setup -q -n astroid-%{version}
%build
%python_build
%install
%python_install
%fdupes %{buildroot}%{_prefix}
%check
cp %{S:1} .
%python_exec -m pytest -s
%files %{python_files}
%defattr(-,root,root,-)
%doc COPYING COPYING.LESSER ChangeLog README.rst
%{python_sitelib}/astroid/
#%{python_sitelib}/astroid-%{version}-py*.egg-info
%{python_sitelib}/astroid-*.egg-info
%changelog