From 5c3a1e329a09d1a0c4a8412ca152100b69d423a6 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Fri, 23 Jul 2021 06:21:17 +0200 Subject: [PATCH] Initial import (#1984419). --- .gitignore | 1 + python-charset-normalizer.spec | 60 ++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 62 insertions(+) create mode 100644 .gitignore create mode 100644 python-charset-normalizer.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8879016 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/2.0.3.tar.gz diff --git a/python-charset-normalizer.spec b/python-charset-normalizer.spec new file mode 100644 index 0000000..5686065 --- /dev/null +++ b/python-charset-normalizer.spec @@ -0,0 +1,60 @@ +Name: python-charset-normalizer +Version: 2.0.3 +Release: 1%{?dist} +Summary: The Real First Universal Charset Detector + +License: MIT +URL: https://github.com/ousret/charset_normalizer +Source0: %{url}/archive/refs/tags/%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildRequires: python3dist(pytest) +BuildRequires: dos2unix + + +%description +A library that helps you read text from an unknown charset encoding. +Motivated by chardet, trying to resolve the issue by taking +a new approach. All IANA character set names for which the Python core +library provides codecs are supported. + +%package -n python3-charset-normalizer +Summary: %{summary} + +%description -n python3-charset-normalizer +A library that helps you read text from an unknown charset encoding. +Motivated by chardet, trying to resolve the issue by taking +a new approach. All IANA character set names for which the Python core +library provides codecs are supported. + +%prep +%autosetup -n charset_normalizer-%{version} +# Remove pytest-cov settings from setup.cfg +sed -i "/addopts = --cov/d" setup.cfg +# Fix line endings in readme +# https://github.com/Ousret/charset_normalizer/issues/66 +dos2unix README.md + +%generate_buildrequires +%pyproject_buildrequires -r + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files charset_normalizer + +%check +%pytest + +%files -n python3-charset-normalizer -f %{pyproject_files} +%license LICENSE +%doc README.md +%{_bindir}/normalizer + +%changelog +* Wed Jul 21 2021 Lumír Balhar - 2.0.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..7279a00 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (2.0.3.tar.gz) = 4fa5507c4c0c61b3722d7423f4b597514a30ad0fea176a77a1e926328003ba6c0f49c95b4f4a64b8dbb32985373706d895bae1c6e3fe1fe224851b8383576923