[Python-modules-commits] r9764 - in packages/pyside/trunk/debian (6 files)

odyx-guest at users.alioth.debian.org odyx-guest at users.alioth.debian.org
Tue Sep 15 15:08:49 UTC 2009


    Date: Tuesday, September 15, 2009 @ 15:08:45
  Author: odyx-guest
Revision: 9764

pyside: Get multiple python versions.

Added:
  packages/pyside/trunk/debian/patches/
  packages/pyside/trunk/debian/patches/multiple_python_versions.patch
  packages/pyside/trunk/debian/patches/series
Modified:
  packages/pyside/trunk/debian/changelog
  packages/pyside/trunk/debian/control
  packages/pyside/trunk/debian/rules

Modified: packages/pyside/trunk/debian/changelog
===================================================================
--- packages/pyside/trunk/debian/changelog	2009-09-15 08:19:00 UTC (rev 9763)
+++ packages/pyside/trunk/debian/changelog	2009-09-15 15:08:45 UTC (rev 9764)
@@ -12,7 +12,8 @@
     - Add Vcs-* and Homepage fields.
     - Change binary packages names from pyside-$module to
       python-pyside.qt$module to fit with Debian Python Policy.
-  * debian/pyversions: Use python-support (python versions 2.4-)
+  * debian/rules: Add tweaks to get muiltiple python versions built.
+  * debian/patches/multiple_python_versions.patch: Add
   * debian/watch: Add.
   * Bump Standards to 3.8.3 - No changes needed.
 

Modified: packages/pyside/trunk/debian/control
===================================================================
--- packages/pyside/trunk/debian/control	2009-09-15 08:19:00 UTC (rev 9763)
+++ packages/pyside/trunk/debian/control	2009-09-15 15:08:45 UTC (rev 9764)
@@ -3,8 +3,9 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Didier Raboud <didier at raboud.com>
-Build-Depends: debhelper (>= 7.0.50), cmake (>= 2.6.0), python-all-dev (>= 2.3.5-11), python-all-dbg (>= 2.3.5-11), libqt4-dev (>= 4.5.0), libphonon-dev (>= 4.3.0), libqt4-opengl-dev (>= 4.5.0), boostpythongenerator (>= 0.1), python-support (>= 0.3.9), libboost-python-dev
+Build-Depends: debhelper (>= 7.0.50), cmake (>= 2.6.0), quilt (>= 0.46-7), python-all-dev (>= 2.3.5-11), python-all-dbg (>= 2.3.5-11), libqt4-dev (>= 4.5.0), libphonon-dev (>= 4.3.0), libqt4-opengl-dev (>= 4.5.0), boostpythongenerator (>= 0.1), python-support (>= 0.3.9), libboost-python-dev
 Standards-Version: 3.8.3
+XS-Python-Version: >= 2.5
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/pyside/trunk/
 Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/pyside/?op=log
 Homepage: http://www.pyside.org/

Added: packages/pyside/trunk/debian/patches/multiple_python_versions.patch
===================================================================
--- packages/pyside/trunk/debian/patches/multiple_python_versions.patch	                        (rev 0)
+++ packages/pyside/trunk/debian/patches/multiple_python_versions.patch	2009-09-15 15:08:45 UTC (rev 9764)
@@ -0,0 +1,52 @@
+Index: pyside-qt4.5+0.2/CMakeLists.txt
+===================================================================
+--- pyside-qt4.5+0.2.orig/CMakeLists.txt	2009-09-15 16:14:45.000000000 +0200
++++ pyside-qt4.5+0.2/CMakeLists.txt	2009-09-15 17:01:22.000000000 +0200
+@@ -6,8 +6,45 @@
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -fno-common -Wall")
+ 
+ find_package(Boost 1.38.0 COMPONENTS python REQUIRED)
+-find_package(PythonLibs REQUIRED)
+-find_package(PythonInterp REQUIRED)
++# Select the Python Executable (Taken from the Gammu CMakeLists.txt)
++if (BUILD_PYTHON)
++    find_program(PYTHON_EXECUTABLE ${BUILD_PYTHON})
++    mark_as_advanced(PYTHON_EXECUTABLE)
++#    execute_process(
++#        COMMAND
++#            ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc()"
++#        OUTPUT_VARIABLE PYTHON_INCLUDE_PATH
++#        OUTPUT_STRIP_TRAILING_WHITESPACE
++#        )
++    execute_process(
++        COMMAND
++            ${PYTHON_EXECUTABLE} -c "import sys; v=sys.version_info[:2]; print '%d.%d' % v"
++        OUTPUT_VARIABLE PYTHON_VERSION
++        OUTPUT_STRIP_TRAILING_WHITESPACE
++        )
++    string (REPLACE "." "" PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
++    find_library (PYTHON_LIBRARY
++        NAMES python${PYTHON_VERSION_NO_DOTS} python${PYTHON_VERSION}
++        PATH_SUFFIXES
++          python${PYTHON_VERSION}/config
++        )
++    find_path(PYTHON_INCLUDE_PATH
++        NAMES Python.h
++        PATH_SUFFIXES
++         python${PYTHON_VERSION}
++        )
++    mark_as_advanced(
++      PYTHON_LIBRARY
++      PYTHON_INCLUDE_PATH
++    )
++    SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
++
++    message (STATUS "Found PythonLibs: ${PYTHON_LIBRARIES}")
++    message (STATUS "Found PythonInterp: ${PYTHON_EXECUTABLE}")
++else (BUILD_PYTHON)
++    find_package(PythonLibs REQUIRED)
++    find_package(PythonInterp REQUIRED)
++endif (BUILD_PYTHON)
+ find_package(Qt4 4.5.0 REQUIRED)
+ 
+ set(BINDING_NAME PySide)

Added: packages/pyside/trunk/debian/patches/series
===================================================================
--- packages/pyside/trunk/debian/patches/series	                        (rev 0)
+++ packages/pyside/trunk/debian/patches/series	2009-09-15 15:08:45 UTC (rev 9764)
@@ -0,0 +1,2 @@
+multiple_python_versions.patch
+DEBUG

Modified: packages/pyside/trunk/debian/rules
===================================================================
--- packages/pyside/trunk/debian/rules	2009-09-15 08:19:00 UTC (rev 9763)
+++ packages/pyside/trunk/debian/rules	2009-09-15 15:08:45 UTC (rev 9764)
@@ -1,12 +1,32 @@
 #!/usr/bin/make -f
 
-%:
-	dh --buildsystem=cmake $@
+# Tweak to build for each python version (stolen from gammu, thanks Michal ÄŒihaÅ™)
 
+# default is first version
+PYVERSIONS=$(shell pyversions -v -r)
+# ALLPY=$(PYVERSIONS:%=%-dbg) $(PYVERSIONS)
+ALLPYY=$(PYVERSIONS)
+
+override_dh_auto_configure: $(ALLPY:%=override_dh_auto_configure-%)
+
 # Disable the RPATH propagation for the libraries
-override_dh_auto_configure:
-	dh_auto_configure -- -DCMAKE_SKIP_RPATH=true
+override_dh_auto_configure-%:
+	mkdir -p build-$*
+	dh_auto_configure --builddirectory=build-$* -- -DBUILD_PYTHON=/usr/bin/python$* -DCMAKE_SKIP_RPATH=true
 
+override_dh_auto_build-%:
+	dh_auto_build --builddirectory=build-$*
+
+override_dh_auto_build: $(ALLPY:%=override_dh_auto_build-%)
+
+override_dh_auto_install-%:
+	dh_auto_install --builddirectory=build-$*
+
+override_dh_auto_clean:
+	rm -rf build-*
+
+override_dh_auto_install: $(ALLPY:%=override_dh_auto_install-%)
+
 # Move debug libraries to our -dbg lib
 override_dh_strip:
 	dh_strip --dbg-package=python-pyside-dbg
@@ -14,3 +34,7 @@
 ## TEMPORARILY DISABLES TESTS (they fail, see bug http://bugs.openbossa.org/show_bug.cgi?id=28)
 override_dh_auto_test:
 	# Don't do anything
+
+%:
+	dh --buildsystem=cmake $@
+




More information about the Python-modules-commits mailing list