From 9c37af6f7b696d603f05bbbc45fa3606e6ceb1a6 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 11 Mar 2017 20:46:18 +0100 Subject: [PATCH] - disable git and hg tests by default --- python-setuptools_scm.spec | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/python-setuptools_scm.spec b/python-setuptools_scm.spec index a04aa6f..c46ec32 100644 --- a/python-setuptools_scm.spec +++ b/python-setuptools_scm.spec @@ -1,8 +1,9 @@ # # Conditional build: -%bcond_without tests # py.test tests -%bcond_without python2 # CPython 2.x module -%bcond_without python3 # CPython 3.x module +%bcond_without tests # py.test tests +%bcond_with tests_scm # py.test tests using SCM programs (git, hg) +%bcond_without python2 # CPython 2.x module +%bcond_without python3 # CPython 3.x module Summary: Python 2 package to manager versions by scm tags Summary(pl.UTF-8): Pakiet Pythona 2 do zarządzania wersjami poprzez etykiety systemu kontroli wersji @@ -33,6 +34,10 @@ BuildRequires: python3-pytest %endif BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.714 +%if %{with tests_scm} +BuildRequires: git-core +BuildRequires: mercurial +%endif Requires: python-setuptools BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -64,6 +69,10 @@ systemach kontroli wersji Mercurial i Git. %prep %setup -q -n setuptools_scm-%{version} +%if %{without tests_scm} +%{__rm} testing/test_{git,mercurial}.py +%endif + %build %if %{with python2} %py_build -- 2.44.0