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