Compare commits

..

No commits in common. 'c9' and 'i8c-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,87 @@
Name: python-chardet
Version: 4.0.0
Release: 5%{?dist}
%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/chardet/chardet
Source0: %{pypi_source chardet}
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: python3-devel
BuildRequires: pyproject-rpm-macros
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: python3-pytest
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 python3-chardet
%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 python3-chardet %_description
%description -n python%{python3_pkgversion}-%{pypi_name} %_description
%prep
%autosetup -p1 -n chardet-%{version}
# 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
%autosetup -p1 -n %{pypi_name}-%{version}
sed -ie '1d' %{pypi_name}/cli/chardetect.py
%build
%pyproject_wheel
%py3_build
%install
%pyproject_install
%pyproject_save_files chardet
%py3_install
mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{python3_version}
%if %{with tests}
%check
%pytest -v
%{__python3} -m pytest -v
%endif
%files -n python3-chardet -f %{pyproject_files}
%files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE
%doc README.rst
%{_bindir}/chardetect
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
%{_bindir}/chardetect-%{python3_version}
%changelog
* Mon Feb 21 2022 Tomas Orsava <torsava@redhat.com> - 4.0.0-5
- Add gating configuration and a simple smoke test
- 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
* Fri May 24 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.0.4-19
- Rebuilt for MSVSphere 8.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 3.0.4-19
- Exclude unsupported i686 arch
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Nov 28 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-18
- Chardet requires setuptools
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-17
- Rebuilt for Python 3.9
* Fri Nov 22 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-17
- Renamed chardetect → chardetect-3.8
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-16
- Bootstrap for Python 3.9
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-16
- Rebuild with tests
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 19 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-15
- Adjusted for Python 3.8 module in RHEL 8
* Thu Nov 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-14
- Subpackage python2-chardet has been removed

Loading…
Cancel
Save