Accepting request 574121 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/574121
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rrdtool?expand=0&rev=68
This commit is contained in:
Dominique Leuenberger 2018-02-12 09:09:21 +00:00 committed by Git OBS Bridge
commit e65e5a63a2
2 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Feb 4 08:56:33 UTC 2018 - obs@botter.cc
- fix building bindings for Python 2 for suse_version < 1500
-------------------------------------------------------------------
Thu Nov 23 13:53:48 UTC 2017 - rbrown@suse.com

View File

@ -28,6 +28,10 @@
%bcond_without libdbi
%bcond_without libwrap
%bcond_with rados
%define python python
%if 0%{?suse_version} >= 1500
%define python python3
%endif
Name: rrdtool
Version: 1.7.0
Release: 0
@ -44,7 +48,9 @@ Source99: %{name}.changes
Patch3: rrdtool-tclsegfault.patch
# PATCH-FIX-UPSTREAM -- bnc#793636
Patch12: rrdtool-zero_vs_nothing.patch
%if 0%{?suse_version} >= 1500
Patch13: python3.patch
%endif
# Needed for tests
BuildRequires: bc
BuildRequires: cairo-devel >= 1.2
@ -63,8 +69,8 @@ BuildRequires: systemd-rpm-macros
BuildRequires: zlib-devel
Requires: dejavu
%if %{with python}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: %{python}-devel
BuildRequires: %{python}-setuptools
%endif
%if %{with lua}
BuildRequires: lua-devel
@ -150,13 +156,13 @@ This package contains the Lua bindings.
%endif
%if %{with python}
%package -n python3-%{name}
%package -n %{python}-%{name}
Summary: Python bindings for RRDtool
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
Requires: python3
Requires: %{python}
%description -n python3-%{name}
%description -n %{python}-%{name}
Python RRDtool bindings.
%endif
@ -210,7 +216,9 @@ daemon was written to alleviate these problems.
%setup -q
%patch3
%patch12 -p1
%if 0%{?suse_version} >= 1500
%patch13 -p1
%endif
# rrd_tool/rrd_cgi: use the date of the last change
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
@ -368,9 +376,13 @@ getent passwd %{rrdcached_user} >/dev/null || useradd -s /sbin/nologin -g %{rrdc
%endif
%if %{with python}
%files -n python3-%{name}
%files -n %{python}-%{name}
%doc bindings/python/COPYING bindings/python/README.md
%if 0%{?suse_version} >= 1500
%{python3_sitearch}/*
%else
%{python_sitearch}/*
%endif
%endif
%if %{with ruby}