[packages/python3-chardet: 2/2] - updated to 5.2.0 - add failtest.patch - spec copied from python-chardet.spec

witekfl witekfl at pld-linux.org
Sun Mar 16 14:38:09 CET 2025


commit 94ce21493df4d374ba13beb6f4d5a8f681bb013e
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date:   Sun Mar 16 13:51:15 2025 +0100

    - updated to 5.2.0
    - add failtest.patch
    - spec copied from python-chardet.spec

 python3-chardet.spec | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)
---
diff --git a/python3-chardet.spec b/python3-chardet.spec
new file mode 100644
index 0000000..cd61d94
--- /dev/null
+++ b/python3-chardet.spec
@@ -0,0 +1,98 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tets
+
+%define		module	chardet
+Summary:	Character encoding auto-detection in Python 3
+Summary(pl.UTF-8):	Automatyczne wykrywanie kodowania znaków w Pythonie 3
+Name:		python3-%{module}
+Version:	5.2.0
+Release:	1
+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:	cc2d8cc9a751641463b4f7cfecad2ffa
+Patch0:		failtest.patch
+URL:		https://pypi.org/project/chardet/
+BuildRequires:	python3 >= 1:3.7
+BuildRequires:	python3-devel >= 1:3.7
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-hypothesis
+BuildRequires:	python3-pytest
+%endif
+%if %{with doc}
+BuildRequires:	python3-sphinx_rtd_theme
+BuildRequires:	sphinx-pdg-3
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Character encoding auto-detection in Python. As smart as your browser.
+
+%description -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
+Group:		Documentation
+
+%description apidocs
+API documentation for Python chardet module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona chardet.
+
+%prep
+%setup -q -n %{module}-%{version}
+%patch -P 0 -p1
+
+cat > setup.py <<EOF
+#!%{_bindir}/python3
+from setuptools import setup
+setup()
+EOF
+
+%build
+%py3_build
+
+%if %{with tests}
+%{__python3} -m pytest test.py
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd) \
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build-3
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%attr(755,root,root) %{_bindir}/chardetect
+%{py3_sitescriptdir}/chardet
+%{py3_sitescriptdir}/chardet-%{version}-py*.egg-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_modules,_static,api,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-chardet.git/commitdiff/94ce21493df4d374ba13beb6f4d5a8f681bb013e



More information about the pld-cvs-commit mailing list