b36e23b
Name:           python-asttokens
d715f3d
Version:        2.4.1
03f9e8c
Release:        %autorelease
b36e23b
Summary:        Module to annotate Python abstract syntax trees with source code positions
b36e23b
5537709
License:        Apache-2.0
b36e23b
URL:            https://pypi.python.org/pypi/asttokens
5e669c7
Source:         https://github.com/gristlabs/asttokens/archive/v%{version}/asttokens-%{version}.tar.gz
97dd58a
b36e23b
BuildArch:      noarch
b9d54f4
BuildRequires:  git-core
b36e23b
BuildRequires:  python3-devel
4870334
BuildRequires:  python3dist(setuptools)
fbdc7cc
BuildRequires:  python3dist(setuptools-scm)
fbdc7cc
BuildRequires:  python3dist(wheel)
97dd58a
BuildRequires:  python3dist(pytest)
97dd58a
BuildRequires:  python3dist(astroid)
97dd58a
BuildRequires:  python3dist(six)
b36e23b
87e42ce
%global _description %{expand:
083a9f2
The asttokens module annotates Python abstract syntax trees (ASTs) with the
083a9f2
positions of tokens and text in the source code that generated them. This makes
083a9f2
it possible for tools that work with logical AST nodes to find the particular
083a9f2
text that resulted in those nodes, for example for automated refactoring or
083a9f2
highlighting.}
b36e23b
b36e23b
%description %_description
b36e23b
b36e23b
%package     -n python3-asttokens
b36e23b
Summary:        %{summary}
e216e06
Requires:       %{py3_dist six}
b36e23b
%{?python_provide:%python_provide python3-asttokens}
b36e23b
b36e23b
%description -n python3-asttokens %_description
b36e23b
b36e23b
%prep
5e669c7
%autosetup -S git -p1 -n asttokens-%{version}
5e669c7
git tag %{version}
b36e23b
b36e23b
%build
b36e23b
%py3_build
b36e23b
b36e23b
%install
b36e23b
%py3_install
b36e23b
b36e23b
%check
b9d54f4
# test_fixture9 and test_sys_modules tests are currently failing with Python 3.12
b9d54f4
pytest-3 tests/ -v "${TEST_ARGS[@]}" -k "not test_fixture9 and not test_sys_modules"
b36e23b
b36e23b
%files -n python3-asttokens
b36e23b
%license LICENSE
b36e23b
%doc README.rst
b36e23b
%{python3_sitelib}/*
b36e23b
b36e23b
%changelog
03f9e8c
%autochangelog