14
0
Files
python-python-magic/python-python-magic.spec
Matej Cepl c9f0ca09c5 - Update to 0.4.25:
- Support file 5.41. 
  - Support os.PathLike types 
  - Fix compat mode handling with empty mime string 
  - Cleanup library loading 
  - add py.typed sentinal per https://www.python.org/dev/peps/pep-0561/#p… 
  - Check for cookie attribute before trying to delete it
  - Revert "Fix bug in Magic when destructor called too early" 
  - Fix yet another import error
  - add more doc pointers for compat mode, and enable PendingDeprecationW…
  - restore python 2.7 to setup.py, to preserve back compat
  - document libmagic compat layer
  - prefix add_compat with an underscore to avoid namespace pollution
  - remove from_open_file, since its duplicative with from_descriptor and…
  - move typing stubs next to implementation
  - temorarily remove dropped support for python2
  - Revert "Remove Python2 from the tests"
  - Merge branch 'master' into redo-compat
  - Remove Python2 from the tests
  - Add support for Python 3.9
  - Added support for magic_descriptor routine
  - Handle undecodable characters in description
  - Handle libmagic versions that don't support MAGIC_EXTENSION 
  - MAGIC_EXTENSION support (file --extension)
  - support changed mime types in test
  - Fix tests with file 5.39
  - add docker tests for archlinux
  - Fallback to default behavior on setparam failure
  - Fix bug in Magic when destructor called too early
  - sheep Create basic stub file for magic.py

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-magic?expand=0&rev=19
2022-02-16 18:13:57 +00:00

69 lines
2.0 KiB
RPMSpec

#
# spec file for package python-python-magic
#
# 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-%{**}}
%define oldpython python
Name: python-python-magic
Version: 0.4.25
Release: 0
Summary: File type identification using libmagic
License: Python-2.0
Group: Development/Languages/Python
URL: https://github.com/ahupp/python-magic
Source: https://github.com/ahupp/python-magic/archive/%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: file
BuildRequires: python-rpm-macros
Requires: file
Provides: python-magic
BuildArch: noarch
%ifpython2
Provides: %{oldpython}-magic
%endif
%python_subpackages
%description
This module uses ctypes to access the libmagic file type
identification library. It makes use of the local magic database and
supports both textual and MIME-type output.
%prep
%setup -q -n python-magic-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LC_ALL=en_US.UTF-8
%pyunittest -v test.test
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/magic
%{python_sitelib}/python_magic-%{version}*-info
%changelog