1
0
python-astroid/python-astroid.spec

95 lines
3.1 KiB
RPMSpec
Raw Normal View History

#
# 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 http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
# Disabled for now wrt issue https://github.com/PyCQA/astroid/issues/439
%bcond_with test
%bcond_without python2
Name: python-astroid
Version: 1.6.1
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
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}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module wrapt}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-lazy-object-proxy
Accepting request 262554 from home:Nijel:branches:devel:languages:python - Update to 1.3.0: * Fix a maximum recursion error occured during the inference, where statements with the same name weren't filtered properly. Closes pylint issue #295. * Check that EmptyNode has an underlying object in EmptyNode.has_underlying_object. * Simplify the understanding of enum members. * Fix an infinite loop with decorator call chain inference, where the decorator returns itself. Closes issue #50. * Various speed improvements. Patch by Alex Munroe. * Add pytest brain plugin. Patch by Robbie Coomber. * Support for Python versions < 2.7 has been dropped, and the source has been made compatible with Python 2 and 3. Running 2to3 on installation for Python 3 is not needed anymore. * astroid now depends on six. * modutils._module_file opens __init__.py in binary mode. Closes issues #51 and #13. * Only C extensions from trusted sources (the standard library) are loaded into the examining Python process to build an AST from the live module. * Path names on case-insensitive filesystems are now properly handled. This fixes the stdlib detection code on Windows. * Metaclass-generating functions like six.with_metaclass are now supported via some explicit detection code. * astroid.register_module_extender has been added to generalize the support for module extenders as used by many brain plugins. * brain plugins can now register hooks to handle failed imports, as done by the gobject-introspection plugin. * The modules have been moved to a separate package directory, `setup.py develop` now works correctly. OBS-URL: https://build.opensuse.org/request/show/262554 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=10
2014-11-21 10:01:07 +01:00
Requires: python-six
Requires: python-wrapt
BuildArch: noarch
%if %{with python2}
BuildRequires: python2-backports.functools_lru_cache
BuildRequires: python2-enum34
BuildRequires: python2-singledispatch
%endif
%ifpython2
Requires: python-backports.functools_lru_cache
Requires: python-enum34
Requires: python-singledispatch
%endif
%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
# remove tests from install
%python_expand rm -rf %{buildroot}%{$python_sitelib}/astroid/tests
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
cp %{SOURCE1} .
%python_exec -m pytest -s
%endif
%files %{python_files}
%doc COPYING COPYING.LESSER ChangeLog README.rst
%{python_sitelib}/astroid/
%{python_sitelib}/astroid-*.egg-info
%changelog