From 2ac0eb5a8b07aa6db6a2e1a5f025f3c2da9b16443737608379f117727a0372e3 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Sat, 9 Dec 2017 15:03:08 +0000 Subject: [PATCH] Accepting request 552427 from home:michalsrb:branches:X11:XOrg - Python2 is gone since suse_version >= 1500. OBS-URL: https://build.opensuse.org/request/show/552427 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xcb-proto?expand=0&rev=21 --- xcb-proto.changes | 5 +++++ xcb-proto.spec | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/xcb-proto.changes b/xcb-proto.changes index 5de9367..b55b27e 100644 --- a/xcb-proto.changes +++ b/xcb-proto.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 5 12:37:37 UTC 2017 - msrb@suse.com + +- Python2 is gone since suse_version >= 1500. + ------------------------------------------------------------------- Thu Nov 16 10:09:19 UTC 2017 - dimstar@opensuse.org diff --git a/xcb-proto.spec b/xcb-proto.spec index 9ed1d14..4cc676d 100644 --- a/xcb-proto.spec +++ b/xcb-proto.spec @@ -16,6 +16,12 @@ # +%if %suse_version >= 1500 +%define have_python2 0 +%else +%define have_python2 1 +%endif + %define dirsuffix 1.12 Name: xcb-proto Version: 7.6_%{dirsuffix} @@ -31,7 +37,10 @@ BuildRequires: autoconf >= 2.57 BuildRequires: automake BuildRequires: fdupes BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +%if %{have_python2} BuildRequires: python2-base +%endif BuildRequires: python3-base %description @@ -51,6 +60,7 @@ The XCB protocol headers for X11 development. xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to generate the majority of its code and API. +%if %{have_python2} %package -n python2-xcb-proto-devel Summary: Python libraries mandatory for XML-XCB Development Group: Development/Libraries/X11 @@ -63,6 +73,7 @@ Obsoletes: python-xcb-proto-devel <= 7.6 Language-independent Python libraries that used to parse an XML description and create objects used by Python code generators in individual language bindings. +%endif %package -n python3-xcb-proto-devel Summary: Python libraries mandatory for XML-XCB Development @@ -80,10 +91,13 @@ bindings. autoreconf -fiv # In order to build both python2 and python3 version we need to run # configure and install twice + +%if %{have_python2} export PYTHON="python2" %configure make %{?_smp_mflags} %make_install +%endif export PYTHON="python3" %configure @@ -98,9 +112,11 @@ make %{?_smp_mflags} %doc %{_datadir}/xcb/* %{_libdir}/pkgconfig/*.pc +%if %{have_python2} %files -n python2-xcb-proto-devel %doc COPYING %{python_sitelib}/xcbgen/ +%endif %files -n python3-xcb-proto-devel %doc COPYING