python-chardet-py3: obsolete python-chardet [release 5.1.0-2mamba;Tue Mar 07 2023]

This commit is contained in:
Silvan Calarco 2024-01-06 10:57:06 +01:00
parent 6148e775a7
commit e7fdb7d15b

View File

@ -1,6 +1,7 @@
%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-chardet Name: python-chardet
Version: 5.0.0 Version: 5.1.0
Release: 1mamba Release: 2mamba
Summary: Universal Encoding Detector Summary: Universal Encoding Detector
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
@ -11,7 +12,6 @@ Source: https://pypi.debian.net/chardet/chardet-%{version}.tar.gz
License: LGPL License: LGPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: libpython3-devel BuildRequires: libpython3-devel
BuildRequires: python3.7dist(setuptools)
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildArch: noarch BuildArch: noarch
@ -34,6 +34,10 @@ Detects:
- TIS-620 (Thai) - TIS-620 (Thai)
%if 0%{?with_pyver} %if 0%{?with_pyver}
%if "0%{?with_pyver}" == "03"
%define py_requires_append \
Obsoletes: python-chardet < 5.1.0-2mamba
%endif
%pyver_package %pyver_package
%endif %endif
@ -41,31 +45,35 @@ Detects:
%setup -q -n chardet-%{version} %setup -q -n chardet-%{version}
%build %build
CFLAGS="%{optflags}" %{__python} setup.py build CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \ %{__python} -m installer --destdir=%{buildroot} dist/*.whl
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{_includedir}/python \
--install-lib=%{python_sitearch} \
--record=%{name}.filelist
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist %if "%{?with_pyver}" != "3"
# Rename any conflicting file outside of python site packages tree
%if 0%{?with_pyver} for f in %{_bindir}/chardetect; do
mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{?pyappend} mv %{buildroot}${f}{,-%{?pyappend}}
sed -i "s|%{_bindir}/chardetect|%{_bindir}/chardetect-%{?pyappend}|" %{name}.filelist done
%endif %endif
%files %{?pyappend} -f %{name}.filelist %files %{?pyappend}
%defattr(-,root,root) %defattr(-,root,root)
%dir %{python_sitearch}/chardet-%{version}-py*.egg-info %{_bindir}/chardetect*
%{python_sitearch}/chardet-%{version}-py*.egg-info/* %dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
%{python_sitelib}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitelib}/%{pkgname}
%{python_sitelib}/%{pkgname}/*
#%doc COPYING #%doc COPYING
%changelog %changelog
* Tue Mar 07 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.0-2mamba
- python-chardet-py3: obsolete python-chardet
* Mon Mar 06 2023 Automatic Build System <autodist@mambasoft.it> 5.1.0-1mamba
- automatic version update by autodist
* Tue Jul 05 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 5.0.0-1mamba * Tue Jul 05 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 5.0.0-1mamba
- update to 5.0.0 - update to 5.0.0