summaryrefslogtreecommitdiff
path: root/python-asttokens.spec
blob: cf4dea4d215ed7b44062042c0a25ca1d03d931bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Name:           python-asttokens
Version:        2.2.1
Release:        1%{?dist}
Summary:        Module to annotate Python abstract syntax trees with source code positions

License:        Apache-2.0
URL:            https://github.com/gristlabs/asttokens
Source0:        %{name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(toml)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(astroid)
BuildRequires:  python3dist(six)
BuildRequires:  python3dist(typing-extensions)

%global _description %{expand:
The asttokens module annotates Python abstract syntax trees (ASTs)
with the positions of tokens and text in the source code that
generated them. This makes it possible for tools that work with
logical AST nodes to find the particular text that resulted in those
nodes, for example for automated refactoring or highlighting.}

%description %_description


%package -n python3-asttokens
Summary:        %{summary}
Requires:       python3dist(six)
%{?python_provide:%python_provide python3-asttokens}

%description -n python3-asttokens %_description


%prep
%autosetup -p1 -n asttokens-%{version}


%build
%py3_build


%install
%py3_install

%check
pytest-3 tests/ -v --ignore=tests/testdata/

%files -n python3-asttokens
%license LICENSE
%doc README.rst
%{python3_sitelib}/*


%changelog
* Wed Mar 29 2023 li_zengyi <zengyi@isrc.iscas.ac.cn> - 2.2.1-1
- Init asttokens 2.2.1 package