1
0
python-astroid/python-astroid.spec
Denisart Benjamin f422f5db3b Accepting request 244298 from home:Nijel:branches:devel:languages:python
- Update to 1.2.0
    * Function nodes can detect decorator call chain and see if they are
      decorated with builtin descriptors (`classmethod` and `staticmethod`).
    * infer_call_result called on a subtype of the builtin type will now
      return a new `Class` rather than an `Instance`.
    * `Class.metaclass()` now handles module-level __metaclass__ declaration
      on python 2, and no longer looks at the __metaclass__ class attribute on
      python 3.
    * Function nodes can detect if they are decorated with subclasses
      of builtin descriptors when determining their type
      (`classmethod` and `staticmethod`).
    * Add `slots` method to `Class` nodes, for retrieving
      the list of valid slots it defines.
    * Expose function annotation to astroid: `Arguments` node
      exposes 'varargannotation', 'kwargannotation' and 'annotations'
      attributes, while `Function` node has the 'returns' attribute.
    * Backported most of the logilab.common.modutils module there, as
      most things there are for pylint/astroid only and we want to be
      able to fix them without requiring a new logilab.common release
    * Fix names grabed using wildcard import in "absolute import mode" 
      (ie with absolute_import activated from the __future__ or with 
      python 3). Fix pylint issue #58.
    * Add support in pylint-brain for understanding enum classes.

OBS-URL: https://build.opensuse.org/request/show/244298
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=6
2014-08-12 10:49:54 +00:00

70 lines
2.4 KiB
RPMSpec

#
# spec file for package python-astroid
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#
Name: python-astroid
Version: 1.2.0
Release: 0
Url: http://bitbucket.org/logilab/astroid
Summary: Rebuild a new abstract syntax tree from Python's ast
License: LGPL-2.1+
Group: Development/Libraries/Python
Source: https://pypi.python.org/packages/source/a/astroid/astroid-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-logilab-common
Requires: python-logilab-common
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%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 -n astroid-%{version}
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root="%{buildroot}"
%files
%defattr(-,root,root,-)
%doc COPYING COPYING.LESSER ChangeLog README
%{python_sitelib}/astroid/
%{python_sitelib}/astroid-%{version}-py*.egg-info
%changelog