forked from pool/python-python-mimeparse
Accepting request 484347 from home:alois:branches:devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/484347 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-mimeparse?expand=0&rev=6
This commit is contained in:
committed by
Git OBS Bridge
parent
ef67da28be
commit
1f991dbf25
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-python-mimeparse
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 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
|
||||
@@ -16,45 +16,48 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-python-mimeparse
|
||||
Version: 1.5.2
|
||||
Version: 1.6.0
|
||||
Release: 0
|
||||
Url: http://code.google.com/p/mimeparse/
|
||||
Summary: Basic functions for parsing and matching mime-type names
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/dbtsai/python-mimeparse
|
||||
Source: https://pypi.io/packages/source/p/python-mimeparse/python-mimeparse-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Provides: python-mimeparse = 0.1.4
|
||||
Obsoletes: python-mimeparse < 0.1.4
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This module provides basic functions for handling mime-types. It can handle
|
||||
matching mime-types against a list of media-ranges. See section 14.1 of
|
||||
matching mime-types against a list of media-ranges. See section 14.1 of
|
||||
the HTTP specification [RFC 2616] for a complete explanation.
|
||||
|
||||
%prep
|
||||
%setup -q -n python-mimeparse-%{version}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
%python_install
|
||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
python mimeparse_test.py
|
||||
%python_exec mimeparse_test.py
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE README.md
|
||||
%{python_sitelib}/*
|
||||
%doc LICENSE README.rst
|
||||
%pycache_only %{python_sitelib}/__pycache__
|
||||
%{python_sitelib}/mimeparse.py*
|
||||
%{python_sitelib}/python_mimeparse-%{version}-py%{python_version}.egg-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user