[Python-apps-commits] r8942 - in packages/cython/trunk/debian (changelog control rules)

yoh at users.alioth.debian.org yoh at users.alioth.debian.org
Mon Jul 16 16:07:55 UTC 2012


    Date: Monday, July 16, 2012 @ 16:07:49
  Author: yoh
Revision: 8942

0002-Provide-Python-3-package.patch (see #674073)

Modified:
  packages/cython/trunk/debian/changelog
  packages/cython/trunk/debian/control
  packages/cython/trunk/debian/rules

Modified: packages/cython/trunk/debian/changelog
===================================================================
--- packages/cython/trunk/debian/changelog	2012-07-16 16:07:07 UTC (rev 8941)
+++ packages/cython/trunk/debian/changelog	2012-07-16 16:07:49 UTC (rev 8942)
@@ -2,8 +2,9 @@
 
   * Change build system to dh_python2
   * Bump Standards-Version to 3.9.3
+  * Provide Python 3 package
 
- -- Bradley M. Froehle <brad.froehle at gmail.com>  Tue, 22 May 2012 17:49:14 -0700
+ -- Bradley M. Froehle <brad.froehle at gmail.com>  Tue, 22 May 2012 18:21:02 -0700
 
 cython (0.15.1-2) unstable; urgency=low
 

Modified: packages/cython/trunk/debian/control
===================================================================
--- packages/cython/trunk/debian/control	2012-07-16 16:07:07 UTC (rev 8941)
+++ packages/cython/trunk/debian/control	2012-07-16 16:07:49 UTC (rev 8942)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
 Uploaders: Ondrej Certik <ondrej at certik.cz>, Yaroslav Halchenko <debian at onerussian.com>
-Build-Depends: debhelper (>= 7.0.50~), python-all-dev (>= 2.6.6-3~), python-all-dbg, help2man (>= 1.37.1~), python-numpy
+Build-Depends: debhelper (>= 7.0.50~), python-all-dev (>= 2.6.6-3~), python-all-dbg, help2man (>= 1.37.1~), python-numpy, python3-all-dev, python3-all-dbg, python3-numpy
 Standards-Version: 3.9.3
 Homepage: http://cython.org/
 Vcs-Svn: svn://svn.debian.org/svn/python-apps/packages/cython/trunk
@@ -36,3 +36,30 @@
 Description: C-Extensions for Python (Debug Build of Cython)
  This package contains Cython libraries built against versions of
  Python configured with --pydebug.
+
+Package: cython3
+Architecture: any
+Depends: ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends}
+Suggests: python-dev, gcc
+Description: C-Extensions for Python 3
+ Cython is a language that makes writing C extensions for the Python language as
+ easy as Python itself. Cython is based on the well-known Pyrex, but supports
+ more cutting edge functionality and optimizations.
+ .
+ The Cython language is very close to the Python language, but Cython
+ additionally supports calling C functions and declaring C types on variables
+ and class attributes. This allows the compiler to generate very efficient C
+ code from Cython code.
+ .
+ This makes Cython the ideal language for wrapping for external C libraries, and
+ for fast C modules that speed up the execution of Python code.
+
+Package: cython3-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends: ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends}, cython3 (= ${binary:Version})
+Suggests: gcc
+Description: C-Extensions for Python 3 (Debug Build of Cython)
+ This package contains Cython libraries built against versions of
+ Python configured with --pydebug.

Modified: packages/cython/trunk/debian/rules
===================================================================
--- packages/cython/trunk/debian/rules	2012-07-16 16:07:07 UTC (rev 8941)
+++ packages/cython/trunk/debian/rules	2012-07-16 16:07:49 UTC (rev 8942)
@@ -12,10 +12,34 @@
 # Python versions
 PYDEF=$(shell pyversions -dv)
 PY2VERS=$(shell pyversions -vr)
+PY3VERS=$(shell py3versions -vr)
 
 %:
-	dh $@ --with python2 --buildsystem python_distutils
+	dh $@ --with python2,python3 --buildsystem python_distutils
 
+override_dh_auto_build:
+	dh_auto_build
+
+	: # Build for Python 3
+	set -e; for v in $(PY3VERS); do \
+	 python$$v setup.py build; \
+	 python$$v-dbg setup.py build; \
+	done
+
+override_dh_auto_install:
+	dh_auto_install
+
+	: # Install for Python 3
+	set -e; for v in $(PY3VERS); do \
+	 python$$v setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
+	 python$$v-dbg setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
+	done
+
+	: # Force the creation of cython3 and cygdb3 executables.
+	: # Shebang lines are fixed in override_dh_install.
+	cp debian/tmp/usr/bin/cython debian/tmp/usr/bin/cython3
+	cp debian/tmp/usr/bin/cygdb debian/tmp/usr/bin/cygdb3
+
 override_dh_installman:
 	: # Generate a manpage using help2man
 	PYTHONPATH=`/bin/ls -d $(CURDIR)/build/lib.*-$(PYDEF)` \
@@ -31,23 +55,29 @@
 
 	: # fix shebang
 	sed -i -e '1 s,#!.*python.*,#!/usr/bin/python,' debian/cython/usr/bin/*
+	sed -i -e '1 s,#!.*python.*,#!/usr/bin/python3,' debian/cython3/usr/bin/*
 
 	: # remove files installed from cython.install that belong in -dbg
 	find $(CURDIR)/debian/cython/ -name "*_d.so" -delete
+	find $(CURDIR)/debian/cython3/ -name "*.cpython-3?d*.so" -delete
 
 	: # share -dbg and normal package doc dirs
 	rm -rf debian/cython-dbg/usr/share/doc/cython-dbg
 	dh_link -pcython-dbg usr/share/doc/cython usr/share/doc/cython-dbg
+	rm -rf debian/cython3-dbg/usr/share/doc/cython3-dbg
+	dh_link -pcython3-dbg usr/share/doc/cython3 usr/share/doc/cython3-dbg
 
 override_dh_installchangelogs:
-	dh_installchangelogs $(CHANGELOGS)/ReleaseHistory
+	dh_installchangelogs -pcython $(CHANGELOGS)/ReleaseHistory
+	dh_installchangelogs -pcython3 $(CHANGELOGS)/ReleaseHistory
 
 override_dh_installdocs: assure-changelogs
-	dh_installdocs $(CHANGELOGS)/ReleaseNotes-*
+	dh_installdocs -pcython $(CHANGELOGS)/ReleaseNotes-*
+	dh_installdocs -pcython3 $(CHANGELOGS)/ReleaseNotes-*
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	set -e; for P in $(PY2VERS); do \
+	set -e; for P in $(PY2VERS) $(PY3VERS); do \
 	 PYTHONPATH=`/bin/ls -d $(CURDIR)/build/lib.*-$$P` \
 	  /usr/bin/python$$P runtests.py --no-refnanny -v -v --work-dir=build/work-dir; \
 	done
@@ -55,6 +85,7 @@
 
 override_dh_strip:
 	dh_strip -pcython --dbg-package=cython-dbg
+	dh_strip -pcython3 --dbg-package=cython3-dbg
 
 override_dh_auto_clean:
 	rm -rf build




More information about the Python-apps-commits mailing list