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