[Python-modules-commits] r22105 - in packages/pyyaml/trunk/debian (8 files)

kitterman at users.alioth.debian.org kitterman at users.alioth.debian.org
Sat Jun 9 05:23:44 UTC 2012


    Date: Saturday, June 9, 2012 @ 05:23:37
  Author: kitterman
Revision: 22105

* Regenerate ext_yaml.c during build
  - Update debian/rules to move the upstream file aside during build
  - Add cython and cython-dbg to build-depends
* Add quilt patch system
  - Add quilt to build-depends
  - Add --with quilt to debian/rules
  - Add README.source
* Add debian/patches/size_t_not_int.diff to fix FTBFS on S390x
  (Closes: #676536)
  - Thanks to Julien Cristau for the patch
* Rework debian/rules to support DEB_BUILD_OPTIONS nocheck
* Bump standards version to 3.9.3 without further change

Added:
  packages/pyyaml/trunk/debian/README.source
  packages/pyyaml/trunk/debian/patches/
  packages/pyyaml/trunk/debian/patches/series
  packages/pyyaml/trunk/debian/patches/size_t_not_int.diff
Modified:
  packages/pyyaml/trunk/debian/changelog
  packages/pyyaml/trunk/debian/control
  packages/pyyaml/trunk/debian/rules
Deleted:
  packages/pyyaml/trunk/debian/pycompat

Added: packages/pyyaml/trunk/debian/README.source
===================================================================
--- packages/pyyaml/trunk/debian/README.source	                        (rev 0)
+++ packages/pyyaml/trunk/debian/README.source	2012-06-09 05:23:37 UTC (rev 22105)
@@ -0,0 +1,58 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+    for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+        if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+                export QUILT_PATCHES=debian/patches
+                break
+        fi
+    done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+    quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+    quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches.  Then, for every file that will be modified by this patch,
+run:
+
+    quilt add <file>
+
+before editing those files.  You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly.  After editing the files, run:
+
+    quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+    quilt import -P <patch> /path/to/patch
+    quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches.  The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+    quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.

Modified: packages/pyyaml/trunk/debian/changelog
===================================================================
--- packages/pyyaml/trunk/debian/changelog	2012-06-07 23:08:47 UTC (rev 22104)
+++ packages/pyyaml/trunk/debian/changelog	2012-06-09 05:23:37 UTC (rev 22105)
@@ -1,3 +1,20 @@
+pyyaml (3.10-3) unstable; urgency=low
+
+  * Regenerate ext_yaml.c during build
+    - Update debian/rules to move the upstream file aside during build
+    - Add cython and cython-dbg to build-depends
+  * Add quilt patch system
+    - Add quilt to build-depends
+    - Add --with quilt to debian/rules
+    - Add README.source
+  * Add debian/patches/size_t_not_int.diff to fix FTBFS on S390x
+    (Closes: #676536)
+    - Thanks to Julien Cristau for the patch
+  * Rework debian/rules to support DEB_BUILD_OPTIONS nocheck
+  * Bump standards version to 3.9.3 without further change
+
+ -- Scott Kitterman <scott at kitterman.com>  Fri, 08 Jun 2012 16:36:33 -0400
+
 pyyaml (3.10-2) unstable; urgency=low
 
   * Remove python3-yaml-dbg find rule in debian/rules so python3 debug package

Modified: packages/pyyaml/trunk/debian/control
===================================================================
--- packages/pyyaml/trunk/debian/control	2012-06-07 23:08:47 UTC (rev 22104)
+++ packages/pyyaml/trunk/debian/control	2012-06-09 05:23:37 UTC (rev 22105)
@@ -3,12 +3,12 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org> 
 Uploaders: Scott Kitterman <scott at kitterman.com>
-Build-Depends: debhelper (>= 7.3.16), python-all-dev (>=2.6.5-13~), python-all-dbg, python3-all-dev (>= 3.1.2-10~), python3-all-dbg, libyaml-dev (>=0.1.2~)
+Build-Depends: debhelper (>= 7.3.16), python-all-dev (>=2.6.5-13~), python-all-dbg, python3-all-dev (>= 3.1.2-10~), python3-all-dbg, libyaml-dev (>=0.1.2~), cython, cython-dbg, quilt
 X-Python-Version: >= 2.4
 X-Python3-Version: >= 3.0
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/pyyaml/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pyyaml/trunk/
-Standards-Version: 3.9.2
+Standards-Version: 3.9.3
 Homepage: http://pyyaml.org/
 
 Package: python-yaml

Added: packages/pyyaml/trunk/debian/patches/series
===================================================================
--- packages/pyyaml/trunk/debian/patches/series	                        (rev 0)
+++ packages/pyyaml/trunk/debian/patches/series	2012-06-09 05:23:37 UTC (rev 22105)
@@ -0,0 +1 @@
+size_t_not_int.diff

Added: packages/pyyaml/trunk/debian/patches/size_t_not_int.diff
===================================================================
--- packages/pyyaml/trunk/debian/patches/size_t_not_int.diff	                        (rev 0)
+++ packages/pyyaml/trunk/debian/patches/size_t_not_int.diff	2012-06-09 05:23:37 UTC (rev 22105)
@@ -0,0 +1,73 @@
+pyyaml FTBFS on the s390x buildd.  It seems this is due to using int
+where the libyaml API uses size_t.  I tested the attached patch in
+zelenka.d.o's sid chroot, and at least the python2 build/test worked (it
+failed with the same error as the buildd pre-patching).
+Patch by Julien Cristau <jcristau at debian.org>
+Add to the pyyaml package by Scott Kitterman <scott at kitterman.com>
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676536
+
+Index: pyyaml-3.10/ext/_yaml.pxd
+===================================================================
+--- pyyaml-3.10.orig/ext/_yaml.pxd	2011-05-29 23:31:01.000000000 -0400
++++ pyyaml-3.10/ext/_yaml.pxd	2012-06-08 16:33:54.309407701 -0400
+@@ -86,15 +86,15 @@
+         YAML_MAPPING_END_EVENT
+ 
+     ctypedef int yaml_read_handler_t(void *data, char *buffer,
+-            int size, int *size_read) except 0
++            size_t size, size_t *size_read) except 0
+ 
+     ctypedef int yaml_write_handler_t(void *data, char *buffer,
+-            int size) except 0
++            size_t size) except 0
+ 
+     ctypedef struct yaml_mark_t:
+-        int index
+-        int line
+-        int column
++        size_t index
++        size_t line
++        size_t column
+     ctypedef struct yaml_version_directive_t:
+         int major
+         int minor
+@@ -113,7 +113,7 @@
+         char *suffix
+     ctypedef struct _yaml_token_scalar_data_t:
+         char *value
+-        int length
++        size_t length
+         yaml_scalar_style_t style
+     ctypedef struct _yaml_token_version_directive_data_t:
+         int major
+@@ -152,7 +152,7 @@
+         char *anchor
+         char *tag
+         char *value
+-        int length
++        size_t length
+         int plain_implicit
+         int quoted_implicit
+         yaml_scalar_style_t style
+Index: pyyaml-3.10/ext/_yaml.pyx
+===================================================================
+--- pyyaml-3.10.orig/ext/_yaml.pyx	2011-05-29 23:31:01.000000000 -0400
++++ pyyaml-3.10/ext/_yaml.pyx	2012-06-08 16:33:54.313409701 -0400
+@@ -905,7 +905,7 @@
+                 raise error
+         return 1
+ 
+-cdef int input_handler(void *data, char *buffer, int size, int *read) except 0:
++cdef int input_handler(void *data, char *buffer, size_t size, size_t *read) except 0:
+     cdef CParser parser
+     parser = <CParser>data
+     if parser.stream_cache is None:
+@@ -1515,7 +1515,7 @@
+             self.ascend_resolver()
+         return 1
+ 
+-cdef int output_handler(void *data, char *buffer, int size) except 0:
++cdef int output_handler(void *data, char *buffer, size_t size) except 0:
+     cdef CEmitter emitter
+     emitter = <CEmitter>data
+     if emitter.dump_unicode == 0:

Deleted: packages/pyyaml/trunk/debian/pycompat
===================================================================
--- packages/pyyaml/trunk/debian/pycompat	2012-06-07 23:08:47 UTC (rev 22104)
+++ packages/pyyaml/trunk/debian/pycompat	2012-06-09 05:23:37 UTC (rev 22105)
@@ -1 +0,0 @@
-2

Modified: packages/pyyaml/trunk/debian/rules
===================================================================
--- packages/pyyaml/trunk/debian/rules	2012-06-07 23:08:47 UTC (rev 22104)
+++ packages/pyyaml/trunk/debian/rules	2012-06-09 05:23:37 UTC (rev 22105)
@@ -4,13 +4,14 @@
 build3vers := $(shell py3versions -sv)
 
 %:
-	dh $@ --with python2, --with python3
+	dh $@ --with python2, --with python3, --with quilt
 
-override_dh_auto_test:
-	python setup.py test
-	python3 setup.py test
+override_dh_auto_build:
 
-override_dh_install:
+override_dh_auto_install:
+	# Move generated _yaml.c aside so we can regenerate it during build
+	mv $(CURDIR)/ext/_yaml.c $(CURDIR)/upstream.yaml.c
+
 	dh_install -ppython-yaml 
 	set -e && for i in $(buildvers); do \
 	  python$$i ./setup.py install --install-layout=deb --root $(CURDIR)/debian/python-yaml; \
@@ -31,22 +32,49 @@
 	  python$$i-dbg ./setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-yaml-dbg; \
 	done
 
-	dh_install
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	set -e && for i in $(buildvers); do \
+	  echo "-- running tests for "$$i" plain --" ; \
+	  python$$i -c "import sys ; sys.path.insert(0, 'debian/python-yaml/usr/lib/python$$i/dist-packages/'); \
+	      sys.path.insert(0, 'tests/lib'); import test_all; test_all.main([])";\
+	done
 
+	set -e && for i in $(buildvers); do \
+	  echo "-- running tests for "$$i" debug --" ; \
+	  python$$i-dbg -c "import sys ; sys.path.insert(0, 'debian/python-yaml-dbg/usr/lib/python$$i/dist-packages/'); \
+	      sys.path.insert(0, 'tests/lib'); import test_all; test_all.main([])";\
+	done
+
+	set -e && for i in $(build3vers); do \
+	  echo "-- running tests for "$$i" plain --" ; \
+	  python$$i -c "import sys ; sys.path.insert(0, 'debian/python3-yaml/usr/lib/python3/dist-packages/'); \
+	      sys.path.insert(0, 'tests/lib3'); import test_all; test_all.main([])";\
+	done
+
+	set -e && for i in $(build3vers); do \
+	  echo "-- running tests for "$$i" debug --" ; \
+	  python$$i -c "import sys ; sys.path.insert(0, 'debian/python3-yaml-dbg/usr/lib/python3/dist-packages/'); \
+	      sys.path.insert(0, 'tests/lib3'); import test_all; test_all.main([])";\
+	done
+endif
+
+	# Put upstream _yaml.c back where we found it
+	mv $(CURDIR)/upstream.yaml.c $(CURDIR)/ext/_yaml.c
+
 override_dh_installdocs:
 	cp $(CURDIR)/CHANGES $(CURDIR)/changelog
 	dh_installdocs
 	rm  $(CURDIR)/changelog
 
 override_dh_installdeb:
-	rm -rf debian/python-yaml-dbg/usr/share/doc/python-yaml-dbg
+	rm -rf $(CURDIR)/debian/python-yaml-dbg/usr/share/doc/python-yaml-dbg
 	ln -s python-yaml debian/python-yaml-dbg/usr/share/doc/python-yaml-dbg
 
-	rm -rf debian/python3-yaml-dbg/usr/share/doc/python3-yaml-dbg
+	rm -rf $(CURDIR)/debian/python3-yaml-dbg/usr/share/doc/python3-yaml-dbg
 	ln -s python3-yaml debian/python3-yaml-dbg/usr/share/doc/python3-yaml-dbg
 
 	dh_installdeb
 
 override_dh_clean:
 	dh_clean
-	rm -rf build
+	rm -rf $(CURDIR)/build




More information about the Python-modules-commits mailing list