Hello community, here is the log from the commit of package python3-PyYAML for openSUSE:Factory checked in at 2016-03-20 11:48:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-PyYAML (Old) and /work/SRC/openSUSE:Factory/.python3-PyYAML.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-PyYAML" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-PyYAML/python3-PyYAML.changes 2014-07-31 07:41:57.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-PyYAML.new/python3-PyYAML.changes 2016-03-20 11:48:17.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Mar 15 11:59:07 UTC 2016 - dval...@suse.com + +- Fix bigendian architectures: PyYAML-big-endian.patch + +------------------------------------------------------------------- New: ---- PyYAML-big-endian.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-PyYAML.spec ++++++ --- /var/tmp/diff_new_pack.EWa4fN/_old 2016-03-20 11:48:18.000000000 +0100 +++ /var/tmp/diff_new_pack.EWa4fN/_new 2016-03-20 11:48:18.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python3-PyYAML # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,9 +24,12 @@ License: MIT Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/P/PyYAML/PyYAML-%{version}.tar.gz +#PATCH-FIX-UPSTREAM https://bitbucket.org/xi/pyyaml/issue/35/test-fails-on-be-s390-x-ppc64 Fix big endian builds +Patch0: PyYAML-big-endian.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libyaml-devel BuildRequires: python3 +BuildRequires: python3-Cython BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -45,8 +48,11 @@ %prep %setup -q -n PyYAML-%{version} +%patch0 -p1 %build +#regenerate _yaml.c +rm -rf ext/_yaml.c CFLAGS="%{optflags}" python3 setup.py build find examples -type f | xargs chmod -x # Fix example permissions ++++++ PyYAML-big-endian.patch ++++++ 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 <jcris...@debian.org> Add to the pyyaml package by Scott Kitterman <sc...@kitterman.com> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676536 Index: PyYAML-3.11/ext/_yaml.pxd =================================================================== --- PyYAML-3.11.orig/ext/_yaml.pxd +++ PyYAML-3.11/ext/_yaml.pxd @@ -86,15 +86,15 @@ cdef extern from "_yaml.h": 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 @@ cdef extern from "_yaml.h": 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 @@ cdef extern from "_yaml.h": 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.11/ext/_yaml.pyx =================================================================== --- PyYAML-3.11.orig/ext/_yaml.pyx +++ PyYAML-3.11/ext/_yaml.pyx @@ -905,7 +905,7 @@ cdef class CParser: 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 @@ cdef class CEmitter: 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: Index: PyYAML-3.11/setup.py =================================================================== --- PyYAML-3.11.orig/setup.py +++ PyYAML-3.11/setup.py @@ -75,20 +75,19 @@ if 'setuptools.extension' in sys.modules sys.modules['distutils.command.build_ext'].Extension = _Extension with_pyrex = None -if sys.version_info[0] < 3: +try: + from Cython.Distutils.extension import Extension as _Extension + from Cython.Distutils import build_ext as _build_ext + with_pyrex = 'cython' +except ImportError: try: - from Cython.Distutils.extension import Extension as _Extension - from Cython.Distutils import build_ext as _build_ext - with_pyrex = 'cython' + # Pyrex cannot build _yaml.c at the moment, + # but it may get fixed eventually. + from Pyrex.Distutils import Extension as _Extension + from Pyrex.Distutils import build_ext as _build_ext + with_pyrex = 'pyrex' except ImportError: - try: - # Pyrex cannot build _yaml.c at the moment, - # but it may get fixed eventually. - from Pyrex.Distutils import Extension as _Extension - from Pyrex.Distutils import build_ext as _build_ext - with_pyrex = 'pyrex' - except ImportError: - pass + pass class Distribution(_Distribution):