python-importlib-metadata/python-importlib-metadata.spec
Matej Cepl 310e1333d3 Accepting request 853672 from home:bnavigator:branches:devel:languages:python
- Update to 3.1.1
  * no changelog, probably just the merge of 2.1.1
- Update in v2.1.1
  * #261: Restored compatibility for package discovery for metadata
    without version in the name and for legacy eggs.
- Update in v3.1.0
  * Merge with 2.1.0.
- Update in v2.1.0
  * #253: When querying for package metadata, the lookup now honors
    package normalization rules.
- Update in v3.0.0
  * Require Python 3.6 or later.
- Upstream switched to pytest, so do we
- Revert last change: The condition for **BuildRequires** does not
  make any sense, as that would also prevent the install of 
  python36-importlib_resources into the build environment.

OBS-URL: https://build.opensuse.org/request/show/853672
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-importlib-metadata?expand=0&rev=4
2020-12-07 23:48:42 +00:00

102 lines
3.5 KiB
RPMSpec
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# spec file for package python-importlib-metadata
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-importlib-metadata%{psuffix}
Version: 3.1.1
Release: 0
Summary: Read metadata from Python packages
License: Apache-2.0
URL: http://importlib-metadata.readthedocs.io/
Source: https://files.pythonhosted.org/packages/source/i/importlib_metadata/importlib_metadata-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module toml}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-zipp >= 0.5
Provides: python-importlib_metadata = %{version}
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module importlib_resources >= 1.3}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pep517}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyfakefs}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module zipp >= 0.5}
%endif
%python_subpackages
%description
importlib_metadata is a library which provides an API for accessing an installed
packages metadata (see PEP 566), such as its entry points or its top-level
name. This functionality intends to replace most uses of pkg_resources entry
point API and metadata API. Along with importlib.resources in Python 3.7 and
newer (backported as importlib_resources for older versions of Python), this can
eliminate the need to use the older and less efficient pkg_resources package.
importlib_metadata is a backport of Python 3.8s standard library
importlib.metadata module for Python 2.7, and 3.4 through 3.7. Users of Python
3.8 and beyond are encouraged to use the standard library module. When imported
on Python 3.8 and later, importlib_metadata replaces the DistributionFinder
behavior from the stdlib, but leaves the API in tact. Developers looking for
detailed API descriptions should refer to the Python 3.8 standard library
documentation.
%prep
%setup -q -n importlib_metadata-%{version}
# don't import from sourcedir during testing
sed -i -e 's/norecursedirs.*/& importlib_metadata/' pytest.ini
%build
%python_build
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
%pytest
%endif
%if !%{with test}
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/importlib_metadata
%{python_sitelib}/importlib_metadata-%{version}*-info
%endif
%changelog