forked from pool/python-python-magic
- Version update to 0.4.15:
* Few test tweaks - Enable tests - Add patch to fix gzip detection in tests: * magic-tests.patch - Add patch to fix working with new file: * magic-new-file.patch - Add patch to work with new mimedb: * magic-new-mime.patch - Add patch magic-pep8.patch to have other patches apply cleanly OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-magic?expand=0&rev=9
This commit is contained in:
committed by
Git OBS Bridge
parent
23116a79d5
commit
070d16a1c8
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-python-magic
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,34 +17,32 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_with test
|
||||
%define oldpython python
|
||||
Name: python-python-magic
|
||||
Version: 0.4.13
|
||||
Version: 0.4.15
|
||||
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://files.pythonhosted.org/packages/source/p/python-magic/python-magic-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
URL: https://github.com/ahupp/python-magic
|
||||
Source: https://github.com/ahupp/python-magic/archive/%{version}.tar.gz
|
||||
Patch0: magic-new-mime.patch
|
||||
Patch1: magic-pep8.patch
|
||||
Patch2: magic-tests.patch
|
||||
Patch3: magic-new-file.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: file
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: file
|
||||
# python-python-magic and python-magic use the same namespace (ie. filename)
|
||||
# and have a very similar functionality but are incompatible to each other.
|
||||
# Upstream discussions:
|
||||
# https://github.com/ahupp/python-magic/issues/21
|
||||
# https://github.com/ahupp/python-magic/issues/33
|
||||
# https://github.com/ahupp/python-magic/issues/57
|
||||
# https://github.com/ahupp/python-magic/issues/21
|
||||
Conflicts: python-magic
|
||||
BuildArch: noarch
|
||||
%ifpython2
|
||||
Conflicts: %{oldpython}-magic
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -54,6 +52,7 @@ supports both textual and MIME-type output.
|
||||
|
||||
%prep
|
||||
%setup -q -n python-magic-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -62,18 +61,12 @@ supports both textual and MIME-type output.
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
pushd test
|
||||
export PYTHONPATH='..'
|
||||
export LANG=en_US.UTF-8
|
||||
%python_exec test.py
|
||||
popd
|
||||
%endif
|
||||
%python_exec setup.py test
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%license LICENSE
|
||||
%{python_sitelib}/magic.py*
|
||||
%pycache_only %{python_sitelib}/__pycache__/magic*.py*
|
||||
%{python_sitelib}/python_magic-%{version}-py*.egg-info
|
||||
|
Reference in New Issue
Block a user