2008-01-29 01:36:02 +01:00
|
|
|
#
|
2011-06-30 13:08:33 +02:00
|
|
|
# spec file for package python-magic
|
2008-01-29 01:36:02 +01:00
|
|
|
#
|
2022-02-22 09:27:59 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2008-01-29 01:36:02 +01:00
|
|
|
#
|
2008-08-21 18:07:05 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-05-27 11:37:06 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-01-29 01:36:02 +01:00
|
|
|
#
|
|
|
|
|
2011-10-02 16:37:56 +02:00
|
|
|
|
2017-10-07 12:37:20 +02:00
|
|
|
# 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-%{**}}
|
2022-03-21 10:18:32 +01:00
|
|
|
%global _miscdir %{_datadir}/misc
|
2008-01-29 01:36:02 +01:00
|
|
|
Name: python-magic
|
2022-06-13 10:55:08 +02:00
|
|
|
Version: 5.42
|
2012-03-23 15:41:17 +01:00
|
|
|
Release: 0
|
2008-01-29 01:36:02 +01:00
|
|
|
Summary: Python module to use libmagic
|
2018-04-06 09:09:50 +02:00
|
|
|
License: BSD-3-Clause AND BSD-4-Clause
|
2012-03-23 15:41:17 +01:00
|
|
|
Group: Development/Languages/Python
|
2022-03-21 10:18:32 +01:00
|
|
|
URL: https://www.darwinsys.com/file/
|
2008-01-29 01:36:02 +01:00
|
|
|
Source99: file.spec
|
2022-03-21 10:18:32 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: findutils
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: zlib-devel
|
2017-10-07 12:37:20 +02:00
|
|
|
Requires: libmagic1
|
|
|
|
Provides: python-file-magic = %{file_magic_version}
|
2022-03-21 10:18:32 +01:00
|
|
|
%{expand:%(sed -n -e '/^Source0\?:/,/^BuildRoot:/p' <%{_sourcedir}/file.spec)}
|
2017-10-07 12:37:20 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2017-10-12 13:26:15 +02:00
|
|
|
This package contains the Python binding that require the magic "file"
|
2008-01-29 01:36:02 +01:00
|
|
|
interface.
|
|
|
|
|
|
|
|
%prep
|
2017-10-07 12:37:20 +02:00
|
|
|
%{expand:%(sed -n -e '/^%%prep/,/^%%build/p' <%{_sourcedir}/file.spec | sed -e '1d' -e '$d')}
|
2018-10-15 16:02:58 +02:00
|
|
|
ln -sf README.md python/README
|
2017-10-07 12:37:20 +02:00
|
|
|
|
|
|
|
pushd python
|
|
|
|
%python_build
|
|
|
|
popd
|
2008-01-29 01:36:02 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
pushd python
|
2017-10-07 12:37:20 +02:00
|
|
|
%python_install
|
2008-01-29 01:36:02 +01:00
|
|
|
popd
|
|
|
|
|
2017-10-07 12:37:20 +02:00
|
|
|
%files %{python_files}
|
2008-01-29 01:36:02 +01:00
|
|
|
%doc python/README python/example.py
|
2017-10-07 12:37:20 +02:00
|
|
|
%{python_sitelib}/magic.py*
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__
|
|
|
|
%{python_sitelib}/file_magic-*-py%{python_version}.egg-info
|
2008-01-29 01:36:02 +01:00
|
|
|
|
|
|
|
%changelog
|