Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/python-chardet.git#73037ec629f34a0708ac71e3909bf16af1ca8c58
This commit is contained in:
parent
f3aaf2e8cc
commit
89ccbc2f64
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,4 +1,2 @@
|
||||
python2-chardet-2.0.1.tgz
|
||||
/chardet-2.2.1.tar.gz
|
||||
/chardet-2.3.0.tar.gz
|
||||
/chardet-3.0.4.tar.gz
|
||||
/chardet-*.tar.gz
|
||||
/chardet-*/
|
||||
|
||||
23
174.patch
23
174.patch
@ -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,19 +1,15 @@
|
||||
%global pypi_name chardet
|
||||
Name: python-%{pypi_name}
|
||||
Version: 3.0.4
|
||||
Release: 19%{?dist}
|
||||
Name: python-chardet
|
||||
Version: 4.0.0
|
||||
Release: 1%{?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
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
|
||||
# Circular dependency on pytest
|
||||
%bcond_without tests
|
||||
@ -21,43 +17,58 @@ BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pytest
|
||||
%endif
|
||||
|
||||
|
||||
%global _description\
|
||||
Character encoding auto-detection in Python. As\
|
||||
smart as your browser. Open source.
|
||||
|
||||
%description %_description
|
||||
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
%description -n python3-%{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
|
||||
%pyproject_install
|
||||
%pyproject_save_files chardet
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%{__python3} -m pytest -v
|
||||
%pytest -v
|
||||
%endif
|
||||
|
||||
%files -n python3-%{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
|
||||
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (chardet-3.0.4.tar.gz) = 61a03b23447a2bfe52ceed4dd1b9afdb5784da1933a623776883ee9f297e341f633e27f0ce0230bd5fdc5fdb5382105ab42736a74a417ddeb9f83af57455dba5
|
||||
SHA512 (chardet-4.0.0.tar.gz) = ebd7f420e1094445270db993f6373ffe7370419e002b0bb13299dc6c9b0f7c4e77b0f44f871fba6371e6869e7c86728514367db377e3137487a3acf50cb81e96
|
||||
|
||||
Loading…
Reference in New Issue
Block a user