SHA256
1
0
forked from pool/file
file/python-magic.spec
Dr. Werner Fink 6eda530961 Accepting request 815549 from home:polslinux:branches:Base:System
- Update to 5.39 
  * Remove unused subtype_mime (Steve Grubb)
  * Remove unused check in okstat (Steve Grubb)
  * Fix mime-type in elf binaries by making sure $x is set
  * Fix indirect negative offsets broken by OFFNEGATIVE
  * Fix GUID equality check
  * PR/165: Handle empty array and strings in JSON
  * PR/162: Add --exclude-quiet
  * Various fixes
  * add guid support
- Removed undo-24c9c0.patch as it is now part of upstream
- Updated file-5.17-option.dif

OBS-URL: https://build.opensuse.org/request/show/815549
OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=214
2020-06-17 15:16:08 +00:00

68 lines
2.0 KiB
RPMSpec

#
# spec file for package python-magic
#
# Copyright (c) 2020 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/
#
# PyPI package name is file-magic. Version is taken from setup.py
%define file_magic_version 0.3.0
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-magic
BuildRequires: %{python_module setuptools}
BuildRequires: findutils
BuildRequires: libtool
BuildRequires: python-rpm-macros
BuildRequires: zlib-devel
URL: http://www.darwinsys.com/file/
Version: 5.39
Release: 0
Summary: Python module to use libmagic
License: BSD-3-Clause AND BSD-4-Clause
Group: Development/Languages/Python
%{expand:%(sed -n -e '/^Source0\?:/,/^BuildRoot:/p' <%{_sourcedir}/file.spec)}
Source99: file.spec
Requires: libmagic1
Provides: python-file-magic = %{file_magic_version}
%global _miscdir %{_datadir}/misc
%python_subpackages
%description
This package contains the Python binding that require the magic "file"
interface.
%prep
%{expand:%(sed -n -e '/^%%prep/,/^%%build/p' <%{_sourcedir}/file.spec | sed -e '1d' -e '$d')}
ln -sf README.md python/README
pushd python
%python_build
popd
%install
pushd python
%python_install
popd
%files %{python_files}
%defattr(-,root,root)
%doc python/README python/example.py
%{python_sitelib}/magic.py*
%pycache_only %{python_sitelib}/__pycache__
%{python_sitelib}/file_magic-*-py%{python_version}.egg-info
%changelog