d225e05802
* Handle the case where the raw builder fails to retrieve the ``__all__`` attribute * Restructure the AST parsing heuristic to always pick the same module * Changed setup.py to work with [distlib](https://pypi.org/project/distlib) * Do not crash with SyntaxError when parsing namedtuples with invalid label * Protect against ``infer_call_result`` failing with `InferenceError` in `Super.getattr()` * Expose a ast_from_string method in AstroidManager, which will accept * ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__`` * Allow slots added dynamically to a class to still be inferred * Allow `FunctionDef.getattr` to look into both instance attrs and special attributes * Infer qualified ``classmethod`` as a classmethod. * Prevent a recursion error to happen when inferring the declared metaclass of a class * Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name * Prevent a recursion error for self reference variables and `type()` calls. * Do not infer the first argument of a staticmethod in a metaclass as the class itself * ``NodeNG.bool_value()`` gained an optional ``context`` parameter * Pass a context argument to ``astroid.Arguments`` to prevent recursion errors * Better inference of class and static methods decorated with custom methods * Reverse the order of decorators for `infer_subscript` * Prevent a recursion error when inferring self-referential variables without definition * Numpy `datetime64.astype` return value is inferred as a `ndarray`. * Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation * Numpy ``ndarray`` attributes ``imag`` and ``real`` are now inferred as ``ndarray``. * Added a call to ``register_transform`` for all functions of the ``brain_numpy_core_multiarray`` * Use the parent of the node when inferring aug assign nodes instead of the statement * Added some functions to the ``brain_numpy_core_umath`` module * Added some functions of the ``numpy.core.multiarray`` module * All the ``numpy ufunc`` functions derived now from a common class that * ``nodes.Const.itered`` returns a list of ``Const`` nodes, not strings * The ``shape`` attribute of a ``numpy ndarray`` is now a ``ndarray`` OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=50
81 lines
2.7 KiB
RPMSpec
81 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package python-astroid
|
|
#
|
|
# Copyright (c) 2020 SUSE LLC
|
|
#
|
|
# 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.4.1
|
|
Release: 0
|
|
Summary: Representation of Python source as an AST for pylint
|
|
License: LGPL-2.1-or-later
|
|
URL: https://github.com/pycqa/astroid
|
|
Source: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz
|
|
Patch0: unpin-deps.patch
|
|
BuildRequires: %{python_module lazy-object-proxy >= 1.4}
|
|
BuildRequires: %{python_module pytest-runner}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module six >= 1.12}
|
|
BuildRequires: %{python_module wrapt >= 1.11}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-lazy-object-proxy >= 1.4
|
|
Requires: python-six >= 1.12
|
|
Requires: python-wrapt >= 1.11
|
|
BuildArch: noarch
|
|
%if 0%{?suse_version} <= 1500
|
|
BuildRequires: %{python_module typed-ast}
|
|
Requires: python-typed-ast
|
|
%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}
|
|
%patch0 -p1
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%license COPYING COPYING.LESSER
|
|
%doc ChangeLog README.rst
|
|
%{python3_sitelib}/astroid/
|
|
%{python3_sitelib}/astroid-*.egg-info
|
|
|
|
%changelog
|