Compare commits
No commits in common. "c8-stream-3.8" and "c9" have entirely different histories.
c8-stream-
...
c9
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/chardet-3.0.4.tar.gz
|
||||
SOURCES/chardet-4.0.0.tar.gz
|
||||
|
||||
@ -1 +1 @@
|
||||
4766fb07e700945a7085d073257f1f320d037ce8 SOURCES/chardet-3.0.4.tar.gz
|
||||
2384f6cfba4685d901262e073a4455d4cf76d102 SOURCES/chardet-4.0.0.tar.gz
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
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,84 +1,104 @@
|
||||
%global pypi_name chardet
|
||||
Name: python-%{pypi_name}
|
||||
Version: 3.0.4
|
||||
Release: 19%{?dist}
|
||||
Name: python-chardet
|
||||
Version: 4.0.0
|
||||
Release: 5%{?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
|
||||
URL: https://github.com/chardet/chardet
|
||||
Source0: %{pypi_source chardet}
|
||||
|
||||
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
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
|
||||
# Circular dependency on pytest
|
||||
%bcond_without tests
|
||||
%if %{with tests}
|
||||
BuildRequires: python%{python3_pkgversion}-pytest
|
||||
BuildRequires: python3-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
|
||||
%package -n python3-chardet
|
||||
Summary: %{summary}
|
||||
|
||||
%description -n python3-chardet %_description
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{pypi_name}-%{version}
|
||||
sed -ie '1d' %{pypi_name}/cli/chardetect.py
|
||||
%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
|
||||
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{python3_version}
|
||||
%pyproject_install
|
||||
%pyproject_save_files chardet
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%{__python3} -m pytest -v
|
||||
%pytest -v
|
||||
%endif
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{pypi_name}
|
||||
|
||||
%files -n python3-chardet -f %{pyproject_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/%{pypi_name}/
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
|
||||
%{_bindir}/chardetect-%{python3_version}
|
||||
%{_bindir}/chardetect
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 3.0.4-19
|
||||
- Exclude unsupported i686 arch
|
||||
* Mon Feb 21 2022 Tomas Orsava <torsava@redhat.com> - 4.0.0-5
|
||||
- Add gating configuration and a simple smoke test
|
||||
- Related: rhbz#1950291
|
||||
|
||||
* Thu Nov 28 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-18
|
||||
- Chardet requires setuptools
|
||||
* 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
|
||||
|
||||
* Fri Nov 22 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-17
|
||||
- Renamed chardetect → chardetect-3.8
|
||||
* 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
|
||||
|
||||
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-16
|
||||
- Rebuild with tests
|
||||
* 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
|
||||
|
||||
* Tue Nov 19 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-15
|
||||
- Adjusted for Python 3.8 module in RHEL 8
|
||||
* 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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-17
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-16
|
||||
- Bootstrap for Python 3.9
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Nov 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-14
|
||||
- Subpackage python2-chardet has been removed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user