Files
python-tokenize-rt/python-tokenize-rt.spec
2026-03-11 22:38:22 +08:00

49 lines
1.5 KiB
RPMSpec

# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Jvle <keke.oerv@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0
%global srcname tokenize-rt
%global modname tokenize_rt
Name: python-%{srcname}
Version: 6.2.0
Release: %autorelease
Summary: Wrapper for Python's stdlib `tokenize` supporting roundtrips
License: MIT
URL: https://github.com/asottile/tokenize-rt/
#!RemoteAsset
Source0: https://files.pythonhosted.org/packages/source/t/%{modname}/%{modname}-%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject
BuildOption(install): -l %{modname}
BuildRequires: gcc
BuildRequires: pkgconfig(python3)
BuildRequires: pyproject-rpm-macros
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(pytest)
# BuildRequires: python3dist(wheel)
Provides: python3-%{srcname}
%python_provide python3-%{srcname}
%description
The stdlib tokenize module does not properly roundtrip. This wrapper
around the stdlib provides two additional tokens ESCAPED_NL and
UNIMPORTANT_WS, and a Token data type. Use src_to_tokens and
tokens_to_src to roundtrip. This library is useful if you are writing
a refactoring tool based on the python tokenization.
%generate_buildrequires
%pyproject_buildrequires
%files -f %{pyproject_files}
%doc README.md
%{_bindir}/tokenize-rt
%changelog
%{?autochangelog}