%global srcname astroid Version: 3.1.0 %global python3_pkgversion 3.11 Name: python-astroid # Note: please check that this doesn't break pylint before committing and building! -GC Release: 2.ac%{?dist} Summary: Common base representation of python source code for pylint and other projects License: LGPL-2.1-or-later URL: https://pypi.org/project/astroid/ Source0: https://github.com/pylint-dev/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest %global _description %{expand: The aim of this module is to provide a common base representation of python source code for projects such as pychecker, pyreverse, pylint... 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.} %description %_description %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} %_description %prep %autosetup -n %{srcname}-%{version} -p1 %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # https://github.com/pylint-dev/astroid/pull/2156#issuecomment-1612640531 rm -rf %{buildroot}%{python3_sitelib}/tests %check %{python3} -m pytest -v %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %{python3_sitelib}/astroid %{python3_sitelib}/astroid*.dist-info/ %changelog * Wed Mar 13 2024 Ding-Yi Chen - 3.1.0-2.ac - Shortcut packaging