[packages/python3-asttokens] - python-asttokens.spec updated to 3.0.0 for python 3.8+

qboosh qboosh at pld-linux.org
Fri Jul 11 22:11:49 CEST 2025


commit e0574aff8956cbb21b1f83282b4537686e3d2e7e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jul 11 22:13:23 2025 +0200

    - python-asttokens.spec updated to 3.0.0 for python 3.8+

 python-asttokens.spec => python3-asttokens.spec | 76 +++----------------------
 1 file changed, 7 insertions(+), 69 deletions(-)
---
diff --git a/python-asttokens.spec b/python3-asttokens.spec
similarity index 54%
rename from python-asttokens.spec
rename to python3-asttokens.spec
index ce3b411..07e2e6b 100644
--- a/python-asttokens.spec
+++ b/python3-asttokens.spec
@@ -2,42 +2,25 @@
 # Conditional build:
 %bcond_without	doc	# Sphinx documentation
 %bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
 
 Summary:	Annotate AST trees with source code positions
 Summary(pl.UTF-8):	Oznaczanie drzew AST lokalizacją w kodzie źródłowym
-Name:		python-asttokens
-Version:	2.4.1
-Release:	3
+Name:		python3-asttokens
+Version:	3.0.0
+Release:	1
 License:	Apache v2.0
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/asttokens/
 Source0:	https://files.pythonhosted.org/packages/source/a/asttokens/asttokens-%{version}.tar.gz
-# Source0-md5:	c353679585a40f43c24ca60fca33bbf6
+# Source0-md5:	7d99c4c80190c3ba64839138ea827970
 URL:		https://pypi.org/project/asttokens/
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools >= 1:44
-BuildRequires:	python-setuptools_scm >= 3.4.3
-BuildRequires:	python-toml
-%if %{with tests}
-BuildRequires:	python-astroid >= 1
-BuildRequires:	python-pytest
-BuildRequires:	python-six >= 1.12.0
-BuildRequires:	python-typing
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.5
+BuildRequires:	python3-modules >= 1:3.8
 BuildRequires:	python3-setuptools >= 1:44
 BuildRequires:	python3-setuptools_scm >= 3.4.3
-BuildRequires:	python3-tomli
 %if %{with tests}
 BuildRequires:	python3-astroid >= 2
+BuildRequires:	python3-astroid < 4
 BuildRequires:	python3-pytest
-BuildRequires:	python3-six >= 1.12.0
-%endif
 %endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
@@ -45,7 +28,7 @@ BuildRequires:	rpmbuild(macros) >= 1.714
 BuildRequires:	python3-sphinx_rtd_theme
 BuildRequires:	sphinx-pdg-3
 %endif
-Requires:	python-modules >= 1:2.7
+Requires:	python3-modules >= 1:3.8
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -59,22 +42,6 @@ Moduł asttokens oznacza abstrakcyjne drzewa składniowe (AST) Pythona
 lokalizacjami tokenów i tekstu w kodzie źródłowym, który je
 wygenerował.
 
-%package -n python3-asttokens
-Summary:	Annotate AST trees with source code positions
-Summary(pl.UTF-8):	Oznaczanie drzew AST lokalizacją w kodzie źródłowym
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.5
-
-%description -n python3-asttokens
-The asttokens module annotates Python abstract syntax trees (ASTs)
-with the positions of tokens and text in the source code that
-generated them.
-
-%description -n python3-asttokens -l pl.UTF-8
-Moduł asttokens oznacza abstrakcyjne drzewa składniowe (AST) Pythona
-lokalizacjami tokenów i tekstu w kodzie źródłowym, który je
-wygenerował.
-
 %package apidocs
 Summary:	API documentation for Python asttokens module
 Summary(pl.UTF-8):	Dokumentacja API modułu Pythona asttokens
@@ -90,23 +57,12 @@ Dokumentacja API modułu Pythona asttokens.
 %setup -q -n asttokens-%{version}
 
 %build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
 %py3_build
 
 %if %{with tests}
 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
 %{__python3} -m pytest tests
 %endif
-%endif
 
 %if %{with doc}
 PYTHONPATH=$(pwd) \
@@ -117,34 +73,16 @@ PYTHONPATH=$(pwd) \
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
 %py3_install
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc README.rst
-%{py_sitescriptdir}/asttokens
-%{py_sitescriptdir}/asttokens-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-asttokens
-%defattr(644,root,root,755)
-%doc README.rst
 %{py3_sitescriptdir}/asttokens
 %{py3_sitescriptdir}/asttokens-%{version}-py*.egg-info
-%endif
 
 %if %{with doc}
 %files apidocs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-asttokens.git/commitdiff/e0574aff8956cbb21b1f83282b4537686e3d2e7e



More information about the pld-cvs-commit mailing list