From a20c7af569d17136429b822e8ffedae8762b5968 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 11:23:45 +0100 Subject: [PATCH] rebuilt with python3 == 3.11 [release 0.24.3-4mamba;Sun Oct 01 2023] --- python-logilab-astng.spec | 55 ++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/python-logilab-astng.spec b/python-logilab-astng.spec index 16f2bf6..0c3c547 100644 --- a/python-logilab-astng.spec +++ b/python-logilab-astng.spec @@ -1,18 +1,20 @@ +%define pkgname %(echo %name | cut -d- -f2- | tr - _) Name: python-logilab-astng Version: 0.24.3 -Release: 3mamba +Release: 4mamba Summary: Python Abstract Syntax Tree New Generation Group: System/Libraries/Python Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: https://www.logilab.org/project/logilab-astng +URL: https://www.logilab.fr/project/logilab-astng Source: https://pypi.debian.net/logilab-astng/logilab-astng-%{version}.tar.gz License: GPL ## AUTOBUILDREQ-BEGIN -BuildRequires: libpython3-devel -BuildRequires: python3.7dist(logilab-common) +BuildRequires: libpython311-devel +BuildRequires: python3.11dist(logilab-common) ## AUTOBUILDREQ-END +BuildRequires: python3-devel >= 3.11.5-3mamba BuildArch: noarch %description @@ -20,6 +22,8 @@ astng allows to rebuild a new abstract syntax tree from Python's ast. The aim of this module is to provide a common base representation of python source code for projects such as pychecker, pyreverse and pylint. %if 0%{?with_pyver} +%define py_requires_append \ +Obsoletes: python-logilab-astng < 0.24.3-4mamba %pyver_package %endif @@ -27,44 +31,35 @@ The aim of this module is to provide a common base representation of python sour %setup -q -n logilab-astng-%{version} %build -%{__python} setup.py build +CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%{__python} setup.py install \ - -O1 --skip-build \ - --root="%{buildroot}" \ - --install-headers=%{_includedir}/python \ - --install-lib=%{python_sitearch} \ - --single-version-externally-managed \ - --record=%{name}.filelist +%{__python} -m installer --destdir=%{buildroot} dist/*.whl -#sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist - -# Fix encoding in readme -iconv -f iso-8859-15 -t utf-8 README > README.utf8 -mv -f README.utf8 README - -# Avoid conflict with python-logilab-common -rm -f %{buildroot}%{python_sitearch}/logilab/__init__.py -# Do not package testsuite -rm -rf %{buildroot}%{python_sitearch}/logilab/astng/test -sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz,;\,/test/,d" %{name}.filelist +#%if "%{?with_pyver}" != "3" +## Rename any conflicting file outside of python site packages tree +#for f in %{_bindir}/pdm; do +# mv %{buildroot}${f}{,-%{?pyappend}} +#done +#%endif %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%files -f %{name}.filelist +%files %{?pyappend} %defattr(-,root,root) -%dir %{python_sitearch}/logilab -%dir %{python_sitearch}/logilab/astng -%dir %{python_sitearch}/logilab/astng/brain -%{python_sitearch}/logilab/astng/brain/* -%dir %{python_sitearch}/logilab_astng-%{version}-py*.egg-info -%{python_sitearch}/logilab_astng-%{version}-py*.egg-info/* +%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info +%{python_sitelib}/%{pkgname}-%{version}.dist-info/* +%dir %{python_sitelib}/logilab +%{python_sitelib}/logilab/* +%{python_sitelib}/logilab_astng-%{version}-py*-nspkg.pth %doc COPYING %changelog +* Sun Oct 01 2023 Silvan Calarco 0.24.3-4mamba +- rebuilt with python3 == 3.11 + * Mon Aug 30 2021 Silvan Calarco 0.24.3-3mamba - rebuilt for py3 and with distdeps