From e7fdb7d15b5ba5885011d10ff0a7b8f25876cb9f Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:57:06 +0100 Subject: [PATCH] python-chardet-py3: obsolete python-chardet [release 5.1.0-2mamba;Tue Mar 07 2023] --- python-chardet.spec | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/python-chardet.spec b/python-chardet.spec index 504a09f..83e6520 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -1,6 +1,7 @@ +%define pkgname %(echo %name | cut -d- -f2- | tr - _) Name: python-chardet -Version: 5.0.0 -Release: 1mamba +Version: 5.1.0 +Release: 2mamba Summary: Universal Encoding Detector Group: System/Libraries Vendor: openmamba @@ -11,7 +12,6 @@ Source: https://pypi.debian.net/chardet/chardet-%{version}.tar.gz License: LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: libpython3-devel -BuildRequires: python3.7dist(setuptools) ## AUTOBUILDREQ-END BuildArch: noarch @@ -34,6 +34,10 @@ Detects: - TIS-620 (Thai) %if 0%{?with_pyver} +%if "0%{?with_pyver}" == "03" +%define py_requires_append \ +Obsoletes: python-chardet < 5.1.0-2mamba +%endif %pyver_package %endif @@ -41,31 +45,35 @@ Detects: %setup -q -n chardet-%{version} %build -CFLAGS="%{optflags}" %{__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} \ - --record=%{name}.filelist +%{__python} -m installer --destdir=%{buildroot} dist/*.whl -sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist - -%if 0%{?with_pyver} -mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{?pyappend} -sed -i "s|%{_bindir}/chardetect|%{_bindir}/chardetect-%{?pyappend}|" %{name}.filelist +%if "%{?with_pyver}" != "3" +# Rename any conflicting file outside of python site packages tree +for f in %{_bindir}/chardetect; do + mv %{buildroot}${f}{,-%{?pyappend}} +done %endif -%files %{?pyappend} -f %{name}.filelist +%files %{?pyappend} %defattr(-,root,root) -%dir %{python_sitearch}/chardet-%{version}-py*.egg-info -%{python_sitearch}/chardet-%{version}-py*.egg-info/* +%{_bindir}/chardetect* +%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info +%{python_sitelib}/%{pkgname}-%{version}.dist-info/* +%dir %{python_sitelib}/%{pkgname} +%{python_sitelib}/%{pkgname}/* #%doc COPYING %changelog +* Tue Mar 07 2023 Silvan Calarco 5.1.0-2mamba +- python-chardet-py3: obsolete python-chardet + +* Mon Mar 06 2023 Automatic Build System 5.1.0-1mamba +- automatic version update by autodist + * Tue Jul 05 2022 Silvan Calarco 5.0.0-1mamba - update to 5.0.0