[packages/python-chardet] Rel 7; drop python3 stuff (python3-chardet.spec instead) and rename chardetect to chardetect-2 (char

arekm arekm at pld-linux.org
Mon Mar 17 21:18:05 CET 2025


commit 1afb354955521217023ef1200fc2dfe8c68ba172
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 17 21:08:20 2025 +0100

    Rel 7; drop python3 stuff (python3-chardet.spec instead) and rename chardetect to chardetect-2 (chardetect is provided by python3 version)

 python-chardet.spec | 59 ++++-------------------------------------------------
 1 file changed, 4 insertions(+), 55 deletions(-)
---
diff --git a/python-chardet.spec b/python-chardet.spec
index a1233ef..4f40abc 100644
--- a/python-chardet.spec
+++ b/python-chardet.spec
@@ -1,7 +1,5 @@
 #
 # Conditional build:
-%bcond_without	python2	# CPython 2.x module
-%bcond_without	python3	# CPython 3.x module
 %bcond_without	doc	# Sphinx documentation
 %bcond_without	tests	# unit tets
 
@@ -10,14 +8,13 @@ Summary:	Character encoding auto-detection in Python 2
 Summary(pl.UTF-8):	Automatyczne wykrywanie kodowania znaków w Pythonie 2
 Name:		python-%{module}
 Version:	4.0.0
-Release:	6
+Release:	7
 License:	LGPL v2.1+
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/chardet/
 Source0:	https://files.pythonhosted.org/packages/source/c/chardet/%{module}-%{version}.tar.gz
 # Source0-md5:	bc9a5603d8d0994b2d4cbf255f99e654
 URL:		https://pypi.org/project/chardet/
-%if %{with python2}
 BuildRequires:	python >= 1:2.7
 BuildRequires:	python-devel >= 1:2.7
 BuildRequires:	python-setuptools
@@ -25,16 +22,6 @@ BuildRequires:	python-setuptools
 BuildRequires:	python-hypothesis
 BuildRequires:	python-pytest
 %endif
-%endif
-%if %{with python3}
-BuildRequires:	python3 >= 1:3.5
-BuildRequires:	python3-devel >= 1:3.5
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-hypothesis
-BuildRequires:	python3-pytest
-%endif
-%endif
 %if %{with doc}
 BuildRequires:	python3-sphinx_rtd_theme
 BuildRequires:	sphinx-pdg-3
@@ -52,19 +39,6 @@ Character encoding auto-detection in Python. As smart as your browser.
 Automatyczne wykrywanie kodowania znaków w Pythonie. Tak zmyślne jak w
 przeglądarce.
 
-%package -n python3-chardet
-Summary:	Character encoding auto-detection in Python 3
-Summary(pl.UTF-8):	Automatyczne wykrywanie kodowania znaków w Pythonie 3
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.5
-
-%description -n python3-chardet
-Character encoding auto-detection in Python. As smart as your browser.
-
-%description -n python3-chardet -l pl.UTF-8
-Automatyczne wykrywanie kodowania znaków w Pythonie. Tak zmyślne jak w
-przeglądarce.
-
 %package apidocs
 Summary:	API documentation for Python chardet module
 Summary(pl.UTF-8):	Dokumentacja API modułu Pythona chardet
@@ -80,21 +54,11 @@ Dokumentacja API modułu Pythona chardet.
 %setup -q -n %{module}-%{version}
 
 %build
-%if %{with python2}
 %py_build
 
 %if %{with tests}
 %{__python} -m pytest test.py
 %endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-%{__python3} -m pytest test.py
-%endif
-%endif
 
 %if %{with doc}
 PYTHONPATH=$(pwd) \
@@ -105,35 +69,20 @@ PYTHONPATH=$(pwd) \
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python3}
-%py3_install
-%endif
-
-%if %{with python2}
 %py_install
-
 %py_postclean
-%endif
+
+mv $RPM_BUILD_ROOT%{_bindir}/chardetect{,-2}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc README.rst
-%attr(755,root,root) %{_bindir}/chardetect
+%attr(755,root,root) %{_bindir}/chardetect-2
 %{py_sitescriptdir}/chardet
 %{py_sitescriptdir}/chardet-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-chardet
-%defattr(644,root,root,755)
-%doc README.rst
-%{py3_sitescriptdir}/chardet
-%{py3_sitescriptdir}/chardet-%{version}-py*.egg-info
-%endif
 
 %if %{with doc}
 %files apidocs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-chardet.git/commitdiff/1afb354955521217023ef1200fc2dfe8c68ba172



More information about the pld-cvs-commit mailing list