Ondřej Súkup
f6073afbcb
- Correct conditional for older distros - Update filelist to work on SLE-12 OBS-URL: https://build.opensuse.org/request/show/662194 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=36
85 lines
2.8 KiB
RPMSpec
85 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package python-astroid
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define skip_python2 1
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-astroid
|
|
Version: 2.1.0
|
|
Release: 0
|
|
Summary: Representation of Python source as an AST for pylint
|
|
License: LGPL-2.1-or-later
|
|
Group: Development/Libraries/Python
|
|
URL: https://github.com/pycqa/astroid
|
|
Source: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz
|
|
Source1: pytest.ini
|
|
BuildRequires: %{python_module lazy-object-proxy}
|
|
BuildRequires: %{python_module pytest-runner}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module six}
|
|
BuildRequires: %{python_module wrapt}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-lazy-object-proxy
|
|
Requires: python-six
|
|
Requires: python-wrapt
|
|
BuildArch: noarch
|
|
%if 0%{?suse_version} < 1500
|
|
BuildRequires: %{python_module typing}
|
|
Requires: python-typing
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
This module provides a common base representation of Python source code for
|
|
projects such as pychecker, pyreverse, pylint. The development of this library
|
|
is governed by pylint's needs.
|
|
|
|
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}
|
|
# FIXME: with next release verify again
|
|
# The numpy checks are broken on py3 completely
|
|
rm -f astroid/tests/unittest_brain_numpy.py
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
cp %{SOURCE1} .
|
|
%python_exec -m pytest -s
|
|
|
|
%files %{python_files}
|
|
%license COPYING COPYING.LESSER
|
|
%doc ChangeLog README.rst
|
|
%{python3_sitelib}/astroid/
|
|
%{python3_sitelib}/astroid-*.egg-info
|
|
|
|
%changelog
|