From 04b5d1be6d2e14ece3a43caa87b79216ea35b65a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 21 2021 06:30:37 +0000 Subject: import python-chardet-3.0.4-19.module+el8.4.0+9540+56f9cecb --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61255db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/chardet-3.0.4.tar.gz diff --git a/.python-chardet.metadata b/.python-chardet.metadata new file mode 100644 index 0000000..0ae0fbd --- /dev/null +++ b/.python-chardet.metadata @@ -0,0 +1 @@ +4766fb07e700945a7085d073257f1f320d037ce8 SOURCES/chardet-3.0.4.tar.gz diff --git a/SOURCES/174.patch b/SOURCES/174.patch new file mode 100644 index 0000000..eef88e9 --- /dev/null +++ b/SOURCES/174.patch @@ -0,0 +1,23 @@ +From 0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Tue, 12 Mar 2019 18:44:36 +0100 +Subject: [PATCH] Support pytest 4, don't apply marks directly to parameters + +Fixes https://github.com/chardet/chardet/issues/173 +--- + test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test.py b/test.py +index 9833307..ad2b753 100644 +--- a/test.py ++++ b/test.py +@@ -59,7 +59,7 @@ def gen_test_params(): + full_path = join(path, file_name) + test_case = full_path, encoding + if full_path in EXPECTED_FAILURES: +- test_case = pytest.mark.xfail(test_case) ++ test_case = pytest.param(*test_case, marks=pytest.mark.xfail) + yield test_case + + diff --git a/SPECS/python-chardet.spec b/SPECS/python-chardet.spec new file mode 100644 index 0000000..ff3efcc --- /dev/null +++ b/SPECS/python-chardet.spec @@ -0,0 +1,187 @@ +%global pypi_name chardet +Name: python-%{pypi_name} +Version: 3.0.4 +Release: 19%{?dist} +Summary: Character encoding auto-detection in Python +License: LGPLv2 +URL: https://github.com/%{pypi_name}/%{pypi_name} +Source0: %pypi_source + +# pytest 4 support +Patch1: https://github.com/chardet/chardet/pull/174.patch + +BuildArch: noarch +# Exclude i686 arch. Due to a modularity issue it's being added to the +# x86_64 compose of CRB, but we don't want to ship it at all. +# See: https://projects.engineering.redhat.com/browse/RCM-72605 +ExcludeArch: i686 + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-rpm-macros + +# Circular dependency on pytest +%bcond_without tests +%if %{with tests} +BuildRequires: python%{python3_pkgversion}-pytest +%endif + + +%global _description\ +Character encoding auto-detection in Python. As\ +smart as your browser. Open source. + +%description %_description + +%package -n python%{python3_pkgversion}-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} +Requires: python%{python3_pkgversion}-setuptools + +%description -n python%{python3_pkgversion}-%{pypi_name} %_description + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} +sed -ie '1d' %{pypi_name}/cli/chardetect.py + +%build +%py3_build + +%install +%py3_install +mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{python3_version} + +%if %{with tests} +%check +%{__python3} -m pytest -v +%endif + +%files -n python%{python3_pkgversion}-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%{_bindir}/chardetect-%{python3_version} + + +%changelog +* Fri Dec 13 2019 Tomas Orsava - 3.0.4-19 +- Exclude unsupported i686 arch + +* Thu Nov 28 2019 Lumír Balhar - 3.0.4-18 +- Chardet requires setuptools + +* Fri Nov 22 2019 Lumír Balhar - 3.0.4-17 +- Renamed chardetect → chardetect-3.8 + +* Wed Nov 20 2019 Lumír Balhar - 3.0.4-16 +- Rebuild with tests + +* Tue Nov 19 2019 Lumír Balhar - 3.0.4-15 +- Adjusted for Python 3.8 module in RHEL 8 + +* Thu Nov 14 2019 Miro Hrončok - 3.0.4-14 +- Subpackage python2-chardet has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Thu Oct 03 2019 Miro Hrončok - 3.0.4-13 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Thu Aug 15 2019 Miro Hrončok - 3.0.4-12 +- Rebuilt for Python 3.8 + +* Wed Aug 14 2019 Miro Hrončok - 3.0.4-11 +- Bootstrap for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 3.0.4-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 3.0.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Aug 17 2018 Miro Hrončok - 3.0.4-8 +- Only have one /usr/bin/chardetect + +* Fri Jul 13 2018 Fedora Release Engineering - 3.0.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jun 13 2018 Miro Hrončok - 3.0.4-6 +- Rebuilt for Python 3.7 + +* Sun Feb 11 2018 Iryna Shcherbina - 3.0.4-5 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 3.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 3.0.4-3 +- Python 2 binary package renamed to python2-chardet + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Jul 27 2017 Fedora Release Engineering - 3.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jun 20 2017 Jeremy Cline - 3.0.4-1 +- Update to 3.0.4 (#1441436) + +* Sat Feb 11 2017 Fedora Release Engineering - 2.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Dec 09 2016 Charalampos Stratakis - 2.3.0-2 +- Rebuild for Python 3.6 + +* Wed Jul 27 2016 Miro Hrončok - 2.3.0-1 +- Update to 2.3.0 (#1150536) + +* Tue Jul 19 2016 Fedora Release Engineering - 2.2.1-6 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 2.2.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Oct 14 2015 Robert Kuska - 2.2.1-4 +- Rebuilt for Python3.5 rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 2.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jul 31 2014 Tom Callaway - 2.2.1-2 +- fix license handling + +* Wed Jul 02 2014 Miro Hrončok - 2.2.1-1 +- Updated to 2.2.1 +- Introduced Python 3 subpackage (upstream has merged the codebase) +- Removed BuildRoot and python_sitelib definition +- Use python2 macros instead of just python + +* Sat Jun 07 2014 Fedora Release Engineering - 2.0.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 2.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 2.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 2.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 2.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jul 21 2010 David Malcolm - 2.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Jan 13 2010 Kushal Das 2.0.1-1 +- New release + +* Sun Jul 26 2009 Fedora Release Engineering - 1.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Aug 04 2008 Kushal Das 1.0.1-1 +- Initial release +