Compare commits

..

No commits in common. 'c9' and 'c8-stream-3.9_bootstrap' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/chardet-4.0.0.tar.gz SOURCES/chardet-3.0.4.tar.gz

@ -1 +1 @@
2384f6cfba4685d901262e073a4455d4cf76d102 SOURCES/chardet-4.0.0.tar.gz 4766fb07e700945a7085d073257f1f320d037ce8 SOURCES/chardet-3.0.4.tar.gz

@ -0,0 +1,23 @@
From 0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
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

@ -1,104 +1,84 @@
Name: python-chardet %global pypi_name chardet
Version: 4.0.0 Name: python-%{pypi_name}
Release: 5%{?dist} Version: 3.0.4
Release: 19%{?dist}
Summary: Character encoding auto-detection in Python Summary: Character encoding auto-detection in Python
License: LGPLv2 License: LGPLv2
URL: https://github.com/chardet/chardet URL: https://github.com/%{pypi_name}/%{pypi_name}
Source0: %{pypi_source chardet} Source0: %pypi_source
# pytest 4 support
Patch1: https://github.com/chardet/chardet/pull/174.patch
BuildArch: noarch 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: python3-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: pyproject-rpm-macros BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-rpm-macros
# Circular dependency on pytest # Circular dependency on pytest
%bcond_without tests %bcond_without tests
%if %{with tests} %if %{with tests}
BuildRequires: python3-pytest BuildRequires: python%{python3_pkgversion}-pytest
%endif %endif
%global _description\ %global _description\
Character encoding auto-detection in Python. As\ Character encoding auto-detection in Python. As\
smart as your browser. Open source. smart as your browser. Open source.
%description %_description %description %_description
%package -n python%{python3_pkgversion}-%{pypi_name}
%package -n python3-chardet
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
Requires: python%{python3_pkgversion}-setuptools
%description -n python3-chardet %_description %description -n python%{python3_pkgversion}-%{pypi_name} %_description
%prep %prep
%autosetup -p1 -n chardet-%{version} %autosetup -p1 -n %{pypi_name}-%{version}
sed -ie '1d' %{pypi_name}/cli/chardetect.py
# Remove useless shebangs
# https://github.com/chardet/chardet/commit/1e94b33329
grep -lr "^#\!/usr/bin/env python" chardet/ | xargs sed -i "1d"
%generate_buildrequires
%pyproject_buildrequires -r
%build %build
%pyproject_wheel %py3_build
%install %install
%pyproject_install %py3_install
%pyproject_save_files chardet mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{python3_version}
%if %{with tests} %if %{with tests}
%check %check
%pytest -v %{__python3} -m pytest -v
%endif %endif
%files -n python%{python3_pkgversion}-%{pypi_name}
%files -n python3-chardet -f %{pyproject_files}
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%{_bindir}/chardetect %{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
%{_bindir}/chardetect-%{python3_version}
%changelog %changelog
* Mon Feb 21 2022 Tomas Orsava <torsava@redhat.com> - 4.0.0-5 * Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 3.0.4-19
- Add gating configuration and a simple smoke test - Exclude unsupported i686 arch
- Related: rhbz#1950291
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 4.0.0-4
- Add automatically generated Obsoletes tag with the python39- prefix
for smoother upgrade from RHEL8
- Related: rhbz#1990421
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.0-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.0-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Feb 05 2021 Miro Hrončok <mhroncok@redhat.com> - 4.0.0-1
- Update to 4.0.0
- Fixes: rhbz#1906585
- Fixes: rhbz#1923076
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-18 * Thu Nov 28 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - Chardet requires setuptools
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-17 * Fri Nov 22 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-17
- Rebuilt for Python 3.9 - Renamed chardetect → chardetect-3.8
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-16 * Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-16
- Bootstrap for Python 3.9 - Rebuild with tests
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-15 * Tue Nov 19 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Adjusted for Python 3.8 module in RHEL 8
* Thu Nov 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-14 * Thu Nov 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-14
- Subpackage python2-chardet has been removed - Subpackage python2-chardet has been removed

Loading…
Cancel
Save