96ae727
# Remove when globs in setup.py work.
96ae727
%{?python_disable_dependency_generator}
96ae727
67693fb
%global srcname     astroid
40947a2
b286363
%global forgeurl https://github.com/PyCQA/astroid
2e2f4a7
Version:        2.15.1
b286363
%forgemeta
b286363
a8757eb
Name:           python-astroid
315f0e4
# Note: please check that this doesn't break pylint before committing and building! -GC
8418893
Release:        %autorelease
811e7a3
Summary:        Common base representation of python source code for pylint and other projects
70b6455
License:        LGPL-2.1-or-later
67693fb
URL:            https://pypi.org/project/astroid/
b286363
Source0:        %{forgesource}
49343a8
a8757eb
BuildArch:      noarch
811e7a3
ce95438
BuildRequires:  pyproject-rpm-macros
811e7a3
BuildRequires:  python3-devel
811e7a3
BuildRequires:  python3-setuptools
67693fb
BuildRequires:  python3-setuptools_scm
f77900f
BuildRequires:  python3-wheel
f77900f
BuildRequires:  python3-pip
23d91a8
BuildRequires:  python3-lazy-object-proxy
811e7a3
BuildRequires:  python3-pytest
811e7a3
BuildRequires:  python3-pytest-runner
23d91a8
BuildRequires:  python3-six
23d91a8
BuildRequires:  python3-typed_ast >= 1.3.0
23d91a8
BuildRequires:  python3-wrapt
811e7a3
BuildRequires:  git-core
092a359
a2b808c
%global _description %{expand:
811e7a3
The aim of this module is to provide a common base representation of python
811e7a3
source code for projects such as pychecker, pyreverse, pylint...
811e7a3
It provides a compatible representation which comes from the _ast module. It
811e7a3
rebuilds the tree generated by the builtin _ast module by recursively walking
811e7a3
down the AST and building an extended ast. The new node classes have additional
811e7a3
methods and attributes for different usages. They include some support for
811e7a3
static inference and local name scopes. Furthermore, astroid builds partial
a2b808c
trees by inspecting living objects.}
a2b808c
a2b808c
%description %_description
a8757eb
67693fb
%package -n python3-%{srcname}
811e7a3
Summary:        %{summary}
67693fb
%{?python_provide:%python_provide python3-%{srcname}}
2cc81a6
Requires:  python3-lazy-object-proxy
2cc81a6
Requires:  python3-wrapt
f524197
Requires:  python3-typed_ast
fbe2ec4
Requires:  python3-six
811e7a3
67693fb
%description -n python3-%{srcname} %_description
40947a2
a8757eb
%prep
67693fb
%autosetup -n %{srcname}-%{version} -p0
fdc0aef
sed -i /six/d astroid/__pkginfo__.py
a8757eb
a8757eb
%build
f77900f
%pyproject_wheel
40947a2
a8757eb
%install
f77900f
%pyproject_install
ea0c5e3
rm -rf %{buildroot}%{python3_sitelib}/tests
40947a2
40947a2
546e700
%check
546e700
%{python3} -m pytest -v
ddec428
40947a2
67693fb
%files -n python3-%{srcname}
f63d7bb
%license LICENSE
a8757eb
%{python3_sitelib}/astroid
f77900f
%{python3_sitelib}/astroid*.dist-info/
a8757eb
a8757eb
%changelog
8418893
%autochangelog