File python-importlib-metadata.spec of Package python-importlib-metadata (Revision db004307fc9233d63383b2b128293a7d)
Currently displaying revision db004307fc9233d63383b2b128293a7d , Show latest
99
1
#
2
# spec file for package python-importlib-metadata
3
#
4
# Copyright (c) 2020 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
20
%if %{python3_version_nodots} >= 38
21
%define skip_python3 1
22
%endif
23
%global flavor @BUILD_FLAVOR@%{nil}
24
%if "%{flavor}" == "test"
25
%define psuffix -test
26
%bcond_without test
27
%else
28
%define psuffix %{nil}
29
%bcond_with test
30
%endif
31
Name: python-importlib-metadata%{psuffix}
32
Version: 1.5.0
33
Release: 0
34
Summary: Tool to read metadata from Python packages
35
License: Apache-2.0
36
URL: https://gitlab.com/python-devs/importlib_metadata
37
Source: https://files.pythonhosted.org/packages/source/i/importlib_metadata/importlib_metadata-%{version}.tar.gz
38
BuildRequires: %{python_module setuptools_scm}
39
BuildRequires: %{python_module setuptools}
40
BuildRequires: fdupes
41
BuildRequires: python-rpm-macros
42
Requires: python-zipp >= 0.5
43
Provides: python-importlib_metadata = %{version}
44
BuildArch: noarch
45
%if %{with test}
46
BuildRequires: %{python_module packaging}
47
BuildRequires: %{python_module pip}
48
BuildRequires: %{python_module pyfakefs}
49
BuildRequires: %{python_module wheel}
50
BuildRequires: %{python_module zipp >= 0.5}
51
BuildRequires: python-importlib_resources
52
BuildRequires: python2-configparser >= 3.5
53
BuildRequires: python2-contextlib2
54
%if %{?suse_version} <= 1500
55
BuildRequires: python3-importlib_resources
56
%endif
57
%if 0%{?suse_version} < 1500
58
BuildRequires: %{python_module pathlib2}
59
%else
60
BuildRequires: python-pathlib2
61
%endif
62
%endif
63
%ifpython2
64
Requires: python-configparser >= 3.5
65
Requires: python-contextlib2
66
Requires: python-pathlib2
67
%endif
68
%python_subpackages
69
70
%description
71
importlib_metadata is a library to access the metadata for a Python
72
package. It is intended to be ported to Python 3.8.
73
74
%prep
75
%setup -q -n importlib_metadata-%{version}
76
77
%build
78
%python_build
79
80
%install
81
%if !%{with test}
82
%python_install
83
%python_expand %fdupes %{buildroot}%{$python_sitelib}
84
%endif
85
86
%check
87
%if %{with test}
88
%python_exec -m unittest discover -v
89
%endif
90
91
%if !%{with test}
92
%files %{python_files}
93
%doc README.rst
94
%license LICENSE
95
%{python_sitelib}/*
96
%endif
97
98
%changelog
99