%{?python_enable_dependency_generator} %global modname binaryornot %global sum A pure Python package to check if a file is binary or text Name: python-binaryornot Version: 0.4.4 Release: 20%{?dist} Summary: %{sum} # Automatically converted from old format: BSD - review is highly recommended. License: LicenseRef-Callaway-BSD URL: http://pypi.python.org/pypi/BinaryOrNot Source0: https://pypi.python.org/packages/source/b/binaryornot/binaryornot-%{version}.tar.gz BuildArch: noarch %description Ultra-lightweight pure Python package to guess whether a file is binary or text, using a heuristic similar to Perl's pp_fttext and its analysis by @eliben. Has tests for these file types: * Text: .txt, .css, .json, .svg, .js, .lua, .pl, .rst * Binary: .png, .gif, .jpg, .tiff, .bmp, .DS_Store, .eot, .otf, .ttf, .woff, .rgb Has tests for numerous encodings. %package -n python3-%{modname} Summary: %{sum} BuildRequires: make BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-chardet >= 2.0.0 BuildRequires: python3-hypothesis %{?python_provide:%python_provide python3-%{modname}} %description -n python3-binaryornot Ultra-lightweight pure Python package to guess whether a file is binary or text, using a heuristic similar to Perl's pp_fttext and its analysis by @eliben. Has tests for these file types: * Text: .txt, .css, .json, .svg, .js, .lua, .pl, .rst * Binary: .png, .gif, .jpg, .tiff, .bmp, .DS_Store, .eot, .otf, .ttf, .woff, .rgb Has tests for numerous encodings. %package -n python-%{modname}-docs Summary: Documentation for python-binaryornot BuildRequires: python3-sphinx %description -n python-%{modname}-docs Documentation for python-binaryornot %prep %autosetup -n %{modname}-%{version} # sed equivalent to # https://github.com/audreyr/binaryornot/commit/38dee57986c6679d99 # not present in 0.4.4 sed -i -e 's|average_size=|max_size=|' tests/test_check.py rm -rf %{modname}.egg-info %build %py3_build make -C docs html PYTHONPATH=$(pwd) %install %py3_install %check %{__python3} setup.py test rm -rf docs/_build/html/.buildinfo %files -n python3-%{modname} %doc README.rst %license LICENSE %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}-* %files -n python-%{modname}-docs %doc docs/_build/html %changelog * Wed Sep 04 2024 Miroslav Suchý - 0.4.4-20 - convert license to SPDX * Fri Jul 19 2024 Fedora Release Engineering - 0.4.4-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 0.4.4-18 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 0.4.4-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.4.4-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.4.4-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jun 15 2023 Python Maint - 0.4.4-14 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 0.4.4-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.4.4-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 0.4.4-11 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 0.4.4-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.4.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.4.4-8 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.4.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 0.4.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.4.4-5 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 0.4.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 0.4.4-3 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 0.4.4-2 - Rebuilt for Python 3.8 * Mon Aug 19 2019 Pierre-Yves Chibon - 0.4.4-1 - Update to 0.4.4 * Mon Aug 19 2019 Miro Hrončok - 0.4.3-8 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 0.4.3-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Wed Jul 24 2019 Charalampos Stratakis - 0.4.3-6 - Fix compatibility with hypothesis 4.0 * Sat Feb 02 2019 Fedora Release Engineering - 0.4.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jan 11 2019 Igor Gnatenko - 0.4.3-4 - Enable python dependency generator * Wed Jan 09 2019 Miro Hrončok - 0.4.3-3 - Subpackage python2-binaryornot has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal * Fri Jul 13 2018 Fedora Release Engineering - 0.4.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jul 10 2018 Pierre-Yves Chibon - 0.4.3-1 - Update to 0.4.3 * Tue Jun 19 2018 Miro Hrončok - 0.4.0-9 - Rebuilt for Python 3.7 * Mon Mar 26 2018 Iryna Shcherbina - 0.4.0-8 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 0.4.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.4.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.4.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.4.0-4 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.4.0-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Mon Nov 30 2015 Pierre-Yves Chibon - 0.4.0-2 - Update the spec to the latest guidelines, generating two sub-packages one for py2 and one for py3 - Build the doc and place it in a -docs sub-package * Fri Nov 27 2015 Pierre-Yves Chibon - 0.4.0-1 - initial package for Fedora