commit c2d3f0f5c4ff5aebd6ea0703c517009ad31652cc
Author: Jakub Bogusz <[email protected]>
Date:   Fri Mar 29 14:30:24 2013 +0100

    - python2/3 bconds

 python-pyatspi.spec | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)
---
diff --git a/python-pyatspi.spec b/python-pyatspi.spec
index a19236b..314e1f9 100644
--- a/python-pyatspi.spec
+++ b/python-pyatspi.spec
@@ -1,3 +1,8 @@
+#
+# Conditional build:
+%bcond_without python2         # Python 2.x module
+%bcond_without python3         # Python 3.x module
+#
 %define        module  pyatspi
 Summary:       AT-SPI Python bindings
 Summary(pl.UTF-8):     Wiązania AT-SPI dla Pythona
@@ -10,12 +15,17 @@ Source0:    
http://ftp.gnome.org/pub/GNOME/sources/pyatspi/2.8/%{module}-%{version}
 # Source0-md5: 930f51c62cca60ebdf90f735d26385b2
 URL:           http://www.linuxfoundation.org/en/AT-SPI_on_D-Bus
 BuildRequires: pkgconfig
-BuildRequires: python-devel >= 1:2.6
-BuildRequires: python-distribute
-BuildRequires: python-pygobject3-devel >= 3.0.0
+BuildRequires: python-pygobject3-common-devel >= 3.0.0
 BuildRequires: rpm-pythonprov
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-distribute
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 3.2
+%endif
 Requires:      at-spi2-core >= 2.8.0
 Requires:      gobject-introspection
 Requires:      python-modules
@@ -47,37 +57,50 @@ Ten pakiet dostarcza wiązania AT-SPI dla Pythona 3.
 %setup -q -n %{module}-%{version}
 
 %build
+%if %{with python3}
 mkdir py3
 cd py3
 ../%configure \
        --with-python="/usr/bin/python3"
 %{__make}
 cd ..
+%endif
 
+%if %{with python2}
 mkdir py2
 cd py2
 ../%configure \
        --with-python="%{__python}"
 %{__make}
 cd ..
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python3}
 %{__make} -C py3 install \
        DESTDIR=$RPM_BUILD_ROOT
+%endif
 
+%if %{with python2}
 %{__make} -C py2 install \
        DESTDIR=$RPM_BUILD_ROOT
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS NEWS README
 %{py_sitescriptdir}/pyatspi
+%endif
 
+%if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
+%doc AUTHORS NEWS README
 %{py3_sitescriptdir}/pyatspi
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyatspi.git/commitdiff/c2d3f0f5c4ff5aebd6ea0703c517009ad31652cc

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to