[Python-modules-commits] r19547 - in packages/shiboken/trunk/debian (7 files)

odyx at users.alioth.debian.org odyx at users.alioth.debian.org
Thu Dec 8 18:31:32 UTC 2011


    Date: Thursday, December 8, 2011 @ 18:31:31
  Author: odyx
Revision: 19547

Add a python3 flavour for libshiboken.

Added:
  packages/shiboken/trunk/debian/libshiboken-py3-1.0.install
  packages/shiboken/trunk/debian/libshiboken-py3-1.0.lintian-overrides
Modified:
  packages/shiboken/trunk/debian/control
  packages/shiboken/trunk/debian/libshiboken1.0.install
  packages/shiboken/trunk/debian/libshiboken1.0.lintian-overrides
  packages/shiboken/trunk/debian/rules
  packages/shiboken/trunk/debian/shiboken-dbg.install

Modified: packages/shiboken/trunk/debian/control
===================================================================
--- packages/shiboken/trunk/debian/control	2011-12-08 17:35:41 UTC (rev 19546)
+++ packages/shiboken/trunk/debian/control	2011-12-08 18:31:31 UTC (rev 19547)
@@ -8,9 +8,11 @@
  libapiextractor-dev (>= 0.10.8),
  generatorrunner (>= 0.6.14), libgenrunner-dev (>= 0.6.14),
  libsparsehash-dev (>= 1.6-1.1~),
- python-all-dev (>= 2.6.6-3), python-all-dbg (>= 2.6.6-3)
+ python-all-dev (>= 2.6.6-3), python-all-dbg (>= 2.6.6-3),
+ python3-all-dev, python3-all-dbg
 Build-Depends-Indep: python-sphinx
 X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 Standards-Version: 3.9.2.0
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/shiboken/trunk/
 Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/shiboken/?op=log
@@ -54,10 +56,24 @@
  .
  This is the shared library used by shiboken.
 
+Package: libshiboken-py3-1.0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
+Description: CPython3 bindings generator for C++ libraries - shared library
+ Shiboken is a bindings generator for C++ libraries that outputs CPython
+ source code. It uses generatorrunner and apiextractor to collect information
+ from library headers, merging modifications and handwritten code defined in the
+ typesystem description.
+ .
+ This is the shared library used by shiboken when used with python3.
+
 Package: libshiboken-dev
 Section: libdevel
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libshiboken1.0 (= ${binary:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, libshiboken1.0 (= ${binary:Version}), libshiboken-py3-1.0 (= ${binary:Version})
 Description: development files for the shiboken bindings generator library
  Shiboken is a bindings generator for C++ libraries that outputs CPython
  source code. It uses generatorrunner and apiextractor to collect information

Added: packages/shiboken/trunk/debian/libshiboken-py3-1.0.install
===================================================================
--- packages/shiboken/trunk/debian/libshiboken-py3-1.0.install	                        (rev 0)
+++ packages/shiboken/trunk/debian/libshiboken-py3-1.0.install	2011-12-08 18:31:31 UTC (rev 19547)
@@ -0,0 +1 @@
+usr/lib/*/libshiboken.cpython-*.so.*

Added: packages/shiboken/trunk/debian/libshiboken-py3-1.0.lintian-overrides
===================================================================
--- packages/shiboken/trunk/debian/libshiboken-py3-1.0.lintian-overrides	                        (rev 0)
+++ packages/shiboken/trunk/debian/libshiboken-py3-1.0.lintian-overrides	2011-12-08 18:31:31 UTC (rev 19547)
@@ -0,0 +1,2 @@
+# We ship compiled versions for each supported python3 version, with a symlink to the default version
+package-name-doesnt-match-sonames

Modified: packages/shiboken/trunk/debian/libshiboken1.0.install
===================================================================
--- packages/shiboken/trunk/debian/libshiboken1.0.install	2011-12-08 17:35:41 UTC (rev 19546)
+++ packages/shiboken/trunk/debian/libshiboken1.0.install	2011-12-08 18:31:31 UTC (rev 19547)
@@ -1 +1 @@
-usr/lib/*/libshiboken*.so.*
+usr/lib/*/libshiboken-python*.so.*

Modified: packages/shiboken/trunk/debian/libshiboken1.0.lintian-overrides
===================================================================
--- packages/shiboken/trunk/debian/libshiboken1.0.lintian-overrides	2011-12-08 17:35:41 UTC (rev 19546)
+++ packages/shiboken/trunk/debian/libshiboken1.0.lintian-overrides	2011-12-08 18:31:31 UTC (rev 19547)
@@ -1,4 +1,2 @@
-# We ship compiled versions for each supported python version, with a symlink
-# to the default version
+# We ship compiled versions for each supported python version, with a symlink to the default version
 package-name-doesnt-match-sonames
-

Modified: packages/shiboken/trunk/debian/rules
===================================================================
--- packages/shiboken/trunk/debian/rules	2011-12-08 17:35:41 UTC (rev 19546)
+++ packages/shiboken/trunk/debian/rules	2011-12-08 18:31:31 UTC (rev 19547)
@@ -1,11 +1,13 @@
 #!/usr/bin/make -f
 
 %:
-	dh $@ --with python2 --buildsystem=cmake --parallel
+	dh $@ --with python2 --with python3 --buildsystem=cmake --parallel
 
 # Python versions (default is first)
 PYVERSIONS=$(shell pyversions -v -r)
 DEFAULT_PY=$(shell pyversions -v -d)
+PY3VERSIONS=$(shell py3versions -v -r)
+DEFAULT_PY3=$(shell py3versions -v -d)
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
@@ -13,16 +15,24 @@
 g++-version := $(shell readlink /usr/bin/g++ | sed -e 's/g++-\(.*\)\.\(.*\)/\1\2/')
 g++-version-ge-4.5 := $(shell if test $(g++-version) -ge 45; then echo "yes"; else echo "no"; fi)
 
+CMAKE_COMMON_OPTIONS := -DCMAKE_SKIP_RPATH=true \
+			-DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH)
+
 #### CONFIGURE ####
 
-override_dh_auto_configure: $(PYVERSIONS:%=override_dh_auto_configure_dbg-%) $(PYVERSIONS:%=override_dh_auto_configure-%)
+override_dh_auto_configure: configure_2 configure_3
 
+configure_2: $(PYVERSIONS:%=override_dh_auto_configure_dbg-%) $(PYVERSIONS:%=override_dh_auto_configure-%)
+	@echo "Python2 versions configured."
+
+configure_3: $(PY3VERSIONS:%=override_dh_auto_configure_3_dbg-%) $(PY3VERSIONS:%=override_dh_auto_configure_3-%)
+	@echo "Python3 versions configured."
+
 override_dh_auto_configure_dbg-%:
 	mkdir -p build-$*-dbg
 	dh_auto_configure -a --builddirectory=build-$*-dbg -- \
+	$(CMAKE_COMMON_OPTIONS) \
 	-DCMAKE_BUILD_TYPE:STRING="Debug" \
-	-DCMAKE_SKIP_RPATH=true \
-	-DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) \
 	-DPYTHON_SUFFIX=-python$*-dbg \
 	-DCMAKE_USE_PYTHON_VERSION="$*-dbg;$*_d;$*" \
 	-DPython_ADDITIONAL_VERSIONS="$*-dbg;$*_d;$*" \
@@ -31,20 +41,48 @@
 override_dh_auto_configure-%:
 	mkdir -p build-$*
 	dh_auto_configure --builddirectory=build-$* -- \
+	$(CMAKE_COMMON_OPTIONS) \
 	-DCMAKE_BUILD_TYPE:STRING="Release" \
-	-DCMAKE_SKIP_RPATH=true \
-	-DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) \
 	-DPYTHON_SUFFIX=-python$* \
 	-DCMAKE_USE_PYTHON_VERSION=$* \
 	-DPython_ADDITIONAL_VERSIONS=$* \
 	-DPYTHON_EXECUTABLE=/usr/bin/python$* \
 	-DDEFAULT_PYTHON_SUFFIX=-python${DEFAULT_PY}
 
+override_dh_auto_configure_3_dbg-%:
+	mkdir -p build-$*-dbg
+	dh_auto_configure -a --builddirectory=build-$*-dbg -- \
+	$(CMAKE_COMMON_OPTIONS) \
+	-DCMAKE_BUILD_TYPE:STRING="Debug" \
+	-DUSE_PYTHON3=ON \
+	-DPYTHON_SUFFIX=-python$*-dbg \
+	-DCMAKE_USE_PYTHON_VERSION="$*-dbg;$*_d;$*" \
+	-DPython_ADDITIONAL_VERSIONS="$*-dbg;$*_d;$*" \
+	-DPYTHON_EXECUTABLE=/usr/bin/python$*-dbg
+
+override_dh_auto_configure_3-%:
+	mkdir -p build-$*
+	dh_auto_configure --builddirectory=build-$* -- \
+	$(CMAKE_COMMON_OPTIONS) \
+	-DCMAKE_BUILD_TYPE:STRING="Release" \
+	-DUSE_PYTHON3=ON \
+	-DPYTHON_SUFFIX=-python$* \
+	-DCMAKE_USE_PYTHON_VERSION=$* \
+	-DPython_ADDITIONAL_VERSIONS=$* \
+	-DPYTHON_EXECUTABLE=/usr/bin/python$* \
+	-DDEFAULT_PYTHON_SUFFIX=-python${DEFAULT_PY}
+
 #### BUILD ####
 
-override_dh_auto_build: $(PYVERSIONS:%=override_dh_auto_build_dbg-%) $(PYVERSIONS:%=override_dh_auto_build-%)
+override_dh_auto_build: build_2 build_3
 	dh_auto_build -i --builddirectory=build-$(DEFAULT_PY) -- doc
 
+build_2: $(PYVERSIONS:%=override_dh_auto_build_dbg-%) $(PYVERSIONS:%=override_dh_auto_build-%)
+	@echo "Python2 versions built."
+
+build_3: $(PY3VERSIONS:%=override_dh_auto_build_dbg-%) $(PY3VERSIONS:%=override_dh_auto_build-%)
+	@echo "Python3 versions built."
+
 override_dh_auto_build_dbg-%:
 	dh_auto_build -a --builddirectory=build-$*-dbg
 
@@ -53,8 +91,14 @@
 
 #### INSTALL ####
 
-override_dh_auto_install: $(PYVERSIONS:%=override_dh_auto_install_dbg-%) $(PYVERSIONS:%=override_dh_auto_install-%)
+override_dh_auto_install: install_2 install_3
 
+install_2: $(PYVERSIONS:%=override_dh_auto_install_dbg-%) $(PYVERSIONS:%=override_dh_auto_install-%)
+	@echo "Python2 versions installed."
+
+install_3: $(PY3VERSIONS:%=override_dh_auto_install_dbg-%) $(PY3VERSIONS:%=override_dh_auto_install-%)
+	@echo "Python3 versions installed."
+
 override_dh_auto_install_dbg-%:
 	dh_auto_install -a --builddirectory=build-$*-dbg --destdir=debian/tmp-dbg
 
@@ -67,8 +111,14 @@
 
 #### TEST ####
 
-override_dh_auto_test: $(PYVERSIONS:%=override_dh_auto_test_dbg-%) $(PYVERSIONS:%=override_dh_auto_test-%)
+override_dh_auto_test: test_2 test_3
 
+test_2: $(PYVERSIONS:%=override_dh_auto_test_dbg-%) $(PYVERSIONS:%=override_dh_auto_test-%)
+	@echo "Python2 versions tested."
+
+test_3: $(PY3VERSIONS:%=override_dh_auto_test_dbg-%) $(PY3VERSIONS:%=override_dh_auto_test-%)
+	@echo "Python3 versions tested."
+
 override_dh_auto_test_dbg-%:
 	- dh_auto_test -a --builddirectory=build-$*-dbg
 
@@ -81,6 +131,8 @@
 	rm -rf debian/tmp-dbg
 	rm -f debian/libshiboken1.0.symbols
 	rm -f debian/libshiboken1.0.symbols-py*
+	rm -f debian/libshiboken-py3-1.0.symbols
+	rm -f debian/libshiboken-py3-1.0.symbols-py*
 
 #### DEBIAN INSTALL ####
 
@@ -109,8 +161,9 @@
 endif
 
 #### Shared libs ####
-override_dh_makeshlibs: $(PYVERSIONS:%=override_dh_makeshlibs-%)
+override_dh_makeshlibs: $(PYVERSIONS:%=override_dh_makeshlibs-%) $(PY3VERSIONS:%=override_dh_makeshlibs_py3-%)
 	cat debian/libshiboken1.0.symbols-py* > debian/libshiboken1.0.symbols
+	cat debian/libshiboken-py3-1.0.symbols-py* > debian/libshiboken-py3-1.0.symbols
 	# Package shiboken ships a usr/lib/generatorrunner/*.so plugin. No shared libs in there.
 	dh_makeshlibs -a -Nshiboken
 
@@ -125,6 +178,18 @@
 	sed -e 's|^ _| (lt-g++4.5)_|g' debian/libshiboken1.0.symbols.g++-lt-4.5 >> debian/libshiboken1.0.symbols-py$*
 endif
 
+override_dh_makeshlibs_py3-%:
+	echo "libshiboken.cpython-$(subst .,,$*)mu.so.1.0 libshiboken-py3-1.0 #MINVER#" > debian/libshiboken-py3-1.0.symbols-py$*
+	cat debian/libshiboken1.0.symbols.pristine >> debian/libshiboken-py3-1.0.symbols-py$*
+ifeq ($(g++-version-ge-4.5),yes)
+	# g++ version is >= 4.5, add related symbols
+	sed -e 's|^ _| (ge-g++4.5)_|g' debian/libshiboken1.0.symbols.g++-ge-4.5 >> debian/libshiboken-py3-1.0.symbols-py$*
+else
+	# g++ version is < 4.5, add related symbols
+	sed -e 's|^ _| (lt-g++4.5)_|g' debian/libshiboken1.0.symbols.g++-lt-4.5 >> debian/libshiboken-py3-1.0.symbols-py$*
+endif
+
+
 override_dh_installdocs:
 	dh_installdocs
 ifneq (,$(filter shiboken-doc, $(shell dh_listpackages)))

Modified: packages/shiboken/trunk/debian/shiboken-dbg.install
===================================================================
--- packages/shiboken/trunk/debian/shiboken-dbg.install	2011-12-08 17:35:41 UTC (rev 19546)
+++ packages/shiboken/trunk/debian/shiboken-dbg.install	2011-12-08 18:31:31 UTC (rev 19547)
@@ -1,2 +1,3 @@
 usr/lib/*/*.so*
 usr/lib/*/cmake/*/*-dbg.cmake
+usr/lib/*/cmake/*/*dmu.cmake




More information about the Python-modules-commits mailing list