14
0

- also do not buildrequire mercurial unless specified

- bcond_with test to run the test suite

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools_scm?expand=0&rev=17
This commit is contained in:
Jan Matejek
2017-06-26 14:10:23 +00:00
committed by Git OBS Bridge
parent cecb0e5497
commit eb5f60a637
2 changed files with 12 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jun 26 14:09:51 UTC 2017 - jmatejek@suse.com
- also do not buildrequire mercurial unless specified
- bcond_with test to run the test suite
-------------------------------------------------------------------
Wed May 17 22:32:38 UTC 2017 - dimstar@opensuse.org

View File

@@ -16,6 +16,7 @@
#
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-setuptools_scm
Version: 1.15.0
@@ -30,9 +31,12 @@ Patch0: no-generic-python.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if %{with test}
# Testing requirements
BuildRequires: %{python_module pytest}
BuildRequires: git
BuildRequires: mercurial
%endif
Requires: python-setuptools
Recommends: git
Recommends: mecurial
@@ -48,9 +52,6 @@ in scm metadata. It also handles file finders for the supperted scm's.
%prep
%setup -q -n setuptools_scm-%{version}
%patch0 -p1
# We can't pull in git into the build root, as this causes a nasty build cycle
# git - curl - nghttp2 - setuptools - git
rm testing/test_{git,regressions}.py
%build
%python_build
@@ -58,8 +59,10 @@ rm testing/test_{git,regressions}.py
%install
%python_install
%if %{with test}
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix}
%endif
%files %python_files
%defattr(-,root,root,-)