17
0
Files
python-filetype/python-filetype.spec
Markéta Machová 4142e3f8df Accepting request 1034400 from home:yarunachalam:branches:devel:languages:python
- Update to 1.2.0 
  * Merge pull request #147 from sayanarijit/fix-146
  * Add tests for m4a
  * Try matching audio before video
  * Merge pull request #145 from RSabet/master
  * update README to include avif
  * added image filetype avif
  * Update __init__.py
  * Merge pull request #141 from ferstar/master
  * test: remove unused imported(F401)
  * refactor: duck-typing reading magic string and try to restore the reader position if possible
  * test: fix E275 missing whitespace after keyword
  * test: Use tox pipeline instead of pytest
  * test: ignore E501 error for flake8 check
  * fix: CLI params parser
  * Merge pull request #137 from ferstar/master
  * fix: guess ".docx" func and add another doc file test case
  * fix: guess ".doc" func and add another doc file test case
  * test: skip benchmark test in tox config
  * fix: restore reader position after retrieving signature bytes
  * Merge pull request #136 from ferstar/master
  * test: no need to skip zstd test case
  * Merge pull request #135 from ferstar/master
  * fix: regression for file-like obj file type detection
  * Merge pull request #134 from babenek/actions
  * Merge pull request #129 from ferstar/master
- Update to 1.1.0
  * Merge branch 'master' into master
  * Merge pull request #133 from magbyr/master
  * Merge pull request #131 from babenek/master

OBS-URL: https://build.opensuse.org/request/show/1034400
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-filetype?expand=0&rev=11
2022-11-08 09:49:13 +00:00

69 lines
2.0 KiB
RPMSpec

#
# spec file for package python-filetype
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-filetype
Version: 1.2.0
Release: 0
Summary: Infer file type and MIME type of any file/buffer. No external dependencies
License: MIT
Group: Development/Languages/Python
URL: https://github.com/h2non/filetype.py
Source: https://files.pythonhosted.org/packages/source/f/filetype/filetype-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
%description
Small and dependency free `Python`_ package to infer file type and MIME
type checking the `magic numbers`_ signature of a file or buffer.
This is a Python port from `filetype`_ Go package.
%prep
%setup -q -n filetype-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/filetype
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m unittest discover -v
%post
%python_install_alternative filetype
%postun
%python_uninstall_alternative filetype
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/filetype*
%python_alternative %{_bindir}/filetype
%changelog