2015-08-12 15:10:39 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-setuptools_scm
|
|
|
|
#
|
2020-01-31 10:34:57 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2015-08-12 15:10:39 +00: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.
|
|
|
|
|
2018-09-18 05:52:54 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-08-12 15:10:39 +00:00
|
|
|
#
|
|
|
|
|
2017-03-02 14:49:06 +00:00
|
|
|
|
2017-03-02 14:38:21 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-07-31 10:03:39 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
2019-07-18 09:22:29 +00:00
|
|
|
%define psuffix -test
|
2018-07-31 10:03:39 +00:00
|
|
|
%bcond_without test
|
|
|
|
%else
|
2019-07-18 09:22:29 +00:00
|
|
|
%define psuffix %{nil}
|
2018-04-14 06:46:36 +00:00
|
|
|
%bcond_with test
|
2018-07-31 10:03:39 +00:00
|
|
|
%endif
|
2019-07-18 09:22:29 +00:00
|
|
|
Name: python-setuptools_scm%{psuffix}
|
2020-07-30 18:47:27 +00:00
|
|
|
Version: 4.1.2
|
2015-08-12 15:10:39 +00:00
|
|
|
Release: 0
|
2018-08-08 17:00:48 +00:00
|
|
|
Summary: Python setuptools handler for SCM tags
|
2015-08-12 15:10:39 +00:00
|
|
|
License: MIT
|
2018-05-15 08:10:01 +00:00
|
|
|
URL: https://github.com/pypa/setuptools_scm
|
2017-03-02 15:07:15 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/setuptools_scm/setuptools_scm-%{version}.tar.gz
|
2019-04-02 15:43:53 +00:00
|
|
|
Patch0: add-rpmfail-pytest-markers.patch
|
2017-03-02 14:38:21 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-08-11 19:54:22 +00:00
|
|
|
BuildRequires: fdupes
|
2017-03-02 14:49:06 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-04-14 06:46:36 +00:00
|
|
|
Requires: python-setuptools
|
2020-01-31 10:34:57 +00:00
|
|
|
Suggests: python-toml
|
2018-04-14 06:46:36 +00:00
|
|
|
BuildArch: noarch
|
2017-06-26 14:10:23 +00:00
|
|
|
%if %{with test}
|
2015-08-12 15:10:39 +00:00
|
|
|
# Testing requirements
|
2018-07-31 09:18:18 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-11-01 08:57:57 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2020-01-31 10:34:57 +00:00
|
|
|
BuildRequires: %{python_module setuptools >= 42}
|
2018-08-07 07:29:17 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm = %{version}}
|
2020-01-31 10:34:57 +00:00
|
|
|
BuildRequires: %{python_module toml}
|
2019-04-02 15:43:53 +00:00
|
|
|
BuildRequires: git-core
|
2020-01-31 10:34:57 +00:00
|
|
|
BuildRequires: mercurial
|
2017-06-26 14:10:23 +00:00
|
|
|
%endif
|
2018-07-31 09:18:18 +00:00
|
|
|
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
|
2019-04-02 15:43:53 +00:00
|
|
|
Recommends: git-core
|
2018-02-27 21:31:52 +00:00
|
|
|
%endif
|
2017-03-02 14:38:21 +00:00
|
|
|
%python_subpackages
|
2015-08-12 15:10:39 +00:00
|
|
|
|
|
|
|
%description
|
2018-08-08 17:00:48 +00:00
|
|
|
The setuptools_scm package handles managing one's Python package versions
|
|
|
|
in SCM metadata. It also handles file finders for the supperted SCMs.
|
2015-08-12 15:10:39 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n setuptools_scm-%{version}
|
2019-04-02 15:43:53 +00:00
|
|
|
%autopatch -p1
|
2015-08-12 15:10:39 +00:00
|
|
|
|
|
|
|
%build
|
2017-03-02 14:38:21 +00:00
|
|
|
%python_build
|
2015-08-12 15:10:39 +00:00
|
|
|
|
|
|
|
%install
|
2018-08-07 07:20:00 +00:00
|
|
|
%if !%{with test}
|
2017-03-02 14:38:21 +00:00
|
|
|
%python_install
|
2018-07-31 09:18:18 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2018-08-07 07:20:00 +00:00
|
|
|
%endif
|
2015-08-12 15:10:39 +00:00
|
|
|
|
2017-06-26 14:10:23 +00:00
|
|
|
%if %{with test}
|
2015-08-12 15:10:39 +00:00
|
|
|
%check
|
2020-01-31 10:34:57 +00:00
|
|
|
# both tests in test_integration.py encounter https://github.com/pypa/setuptools_scm/issues/386 (at least on Python 2)
|
|
|
|
%pytest -k 'not test_integration'
|
2017-06-26 14:10:23 +00:00
|
|
|
%endif
|
2015-08-12 15:10:39 +00:00
|
|
|
|
2019-04-03 08:02:15 +00:00
|
|
|
%if !%{with test}
|
2018-04-14 06:46:36 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst CHANGELOG.rst
|
2018-07-30 07:32:50 +00:00
|
|
|
%{python_sitelib}/setuptools_scm*
|
2018-08-07 07:20:00 +00:00
|
|
|
%endif
|
2015-08-12 15:10:39 +00:00
|
|
|
|
|
|
|
%changelog
|