#1 Build require Python 2 only when needed
Merged 6 years ago by kdudka. Opened 6 years ago by ishcherb.
rpms/ ishcherb/csmock master  into  master

file modified
+7 -3
@@ -1,6 +1,6 @@ 

  Name:       csmock

  Version:    2.0.4

- Release:    2%{?dist}

+ Release:    3%{?dist}

  Summary:    A mock wrapper for Static Analysis tools

  

  Group:      Development/Tools
@@ -8,10 +8,9 @@ 

  URL:        https://github.com/kdudka/%{name}

  Source0:    https://github.com/kdudka/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.xz

  

- BuildRequires: GitPython

  BuildRequires: cmake

  BuildRequires: help2man

- BuildRequires: python-devel

+ 

  %if !(0%{?fedora} >= 19 || 0%{?rhel} >= 7)

  BuildRequires: python-argparse

  %endif
@@ -24,6 +23,8 @@ 

  %global csmock_python_executable %{__python3}

  %global csmock_python_sitelib %{python3_sitelib}

  %else

+ BuildRequires: GitPython

+ BuildRequires: python-devel

  %if 0%{?rhel} && 0%{?rhel} <= 6

  %{!?__python2: %global __python2 /usr/bin/python2}

  %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@@ -193,6 +194,9 @@ 

  %endif

  

  %changelog

+ * Mon Jan 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.4-3

+ - Build require Python 2 only when needed

+ 

  * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

  

Since csmock is Python 3 only in Fedora, there is no need to build require GitPython and python-devel.

Looks good. Thanks!

I have pushed this change also upstream:

https://github.com/kdudka/csmock/commit/73987331

Pull-Request has been merged by kdudka

6 years ago