%global pypi_name charset-normalizer %bcond_with test Name: python-%{pypi_name} Version: 3.0.1 Release: %mkrel 1 Summary: The Real First Universal Charset Detector Group: Development/Python License: MIT URL: https://github.com/ousret/charset_normalizer Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %if %{with test} BuildRequires: python3dist(pytest) %endif %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-%{pypi_name} Summary: %{summary} Group: Development/Python %description -n python3-%{pypi_name} 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 %{pypi_name}-%{version} -p1 # Remove pytest-cov settings from setup.cfg sed -i "/addopts = --cov/d" setup.cfg %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files charset_normalizer %if %{with test} %check %pytest %endif %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %{_bindir}/normalizer %changelog * Sun Jan 22 2023 wally <wally> 3.0.1-1.mga9 + Revision: 1934871 - new version 3.0.1 * Tue Aug 16 2022 kekepower <kekepower> 2.1.0-1.mga9 + Revision: 1878155 - Update to version 2.1.0 * Wed Mar 23 2022 umeabot <umeabot> 2.0.11-4.mga9 + Revision: 1821070 - Mageia 9 Mass Rebuild * Sun Feb 06 2022 wally <wally> 2.0.11-3.mga9 + Revision: 1771985 - bootstrap build for python3.10 without pytest - rebuild for python3.10 * Wed Feb 02 2022 mrambo3501 <mrambo3501> 2.0.11-1.mga9 + Revision: 1771098 - version 2.0.11 * Mon Aug 09 2021 luigiwalser <luigiwalser> 2.0.4-1.mga9 + Revision: 1740743 - adapt spec to mageia - imported package python-charset-normalizer * Mon Aug 02 2021 LumÃr Balhar <lbalhar@redhat.com> - 2.0.4-1 - Update to 2.0.4 Resolves: rhbz#1988575 * Wed Jul 21 2021 LumÃr Balhar <lbalhar@redhat.com> - 2.0.3-1 - Initial package