]> git.pld-linux.org Git - packages/python-pyatspi.git/commitdiff
- python2/3 bconds
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 29 Mar 2013 13:30:24 +0000 (14:30 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 29 Mar 2013 13:30:24 +0000 (14:30 +0100)
python-pyatspi.spec

index a19236b0d144b4a67c98be530c57867d561e20aa..314e1f9a0067348d42565c600661856a59e2cea4 100644 (file)
@@ -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
This page took 0.117498 seconds and 4 git commands to generate.