Hello community, here is the log from the commit of package python-cffi for openSUSE:Factory checked in at 2017-04-19 18:03:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cffi (Old) and /work/SRC/openSUSE:Factory/.python-cffi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cffi" Wed Apr 19 18:03:54 2017 rev:15 rq:482892 version:1.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cffi/python-cffi.changes 2016-05-31 12:12:00.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-cffi.new/python-cffi.changes 2017-04-19 18:03:56.292298503 +0200 @@ -1,0 +2,86 @@ +Mon Mar 27 11:50:31 UTC 2017 - jmate...@suse.com + +- do not generate HTML documentation for packages that are indirect + dependencies of Sphinx + (see docs at https://cffi.readthedocs.org/ ) + +------------------------------------------------------------------- +Thu Mar 16 17:33:16 UTC 2017 - jmate...@suse.com + +- update to 1.9.1 + - Structs with variable-sized arrays as their last field: now we track the + length of the array after ffi.new() is called, just like we always tracked + the length of ffi.new("int[]", 42). This lets us detect out-of-range + accesses to array items. This also lets us display a better repr(), and + have the total size returned by ffi.sizeof() and ffi.buffer(). Previously + both functions would return a result based on the size of the declared + structure type, with an assumed empty array. (Thanks andrew for starting + this refactoring.) + - Add support in cdef()/set_source() for unspecified-length arrays in + typedefs: typedef int foo_t[...];. It was already supported for global + variables or structure fields. + - I turned in v1.8 a warning from cffi/model.py into an error: 'enum xxx' has + no values explicitly defined: refusing to guess which integer type it is + meant to be (unsigned/signed, int/long). Now I’m turning it back to a + warning again; it seems that guessing that the enum has size int is a + 99%-safe bet. (But not 100%, so it stays as a warning.) + - Fix leaks in the code handling FILE * arguments. In CPython 3 there is a + remaining issue that is hard to fix: if you pass a Python file object to a + FILE * argument, then os.dup() is used and the new file descriptor is only + closed when the GC reclaims the Python file object—and not at the earlier + time when you call close(), which only closes the original file descriptor. + If this is an issue, you should avoid this automatic convertion of Python + file objects: instead, explicitly manipulate file descriptors and call + fdopen() from C (...via cffi). + - When passing a void * argument to a function with a different pointer type, + or vice-versa, the cast occurs automatically, like in C. The same occurs + for initialization with ffi.new() and a few other places. However, I + thought that char * had the same property—but I was mistaken. In C you get + the usual warning if you try to give a char * to a char ** argument, for + example. Sorry about the confusion. This has been fixed in CFFI by giving + for now a warning, too. It will turn into an error in a future version. + - Issue #283: fixed ffi.new() on structures/unions with nested anonymous + structures/unions, when there is at least one union in the mix. When + initialized with a list or a dict, it should now behave more closely like + the { } syntax does in GCC. + - CPython 3.x: experimental: the generated C extension modules now use the + “limited API”, which means that, as a compiled .so/.dll, it should work + directly on any version of CPython >= 3.2. The name produced by distutils + is still version-specific. To get the version-independent name, you can + rename it manually to NAME.abi3.so, or use the very recent setuptools 26. + - Added ffi.compile(debug=...), similar to python setup.py build --debug but + defaulting to True if we are running a debugging version of Python itself. + - Removed the restriction that ffi.from_buffer() cannot be used on byte + strings. Now you can get a char * out of a byte string, which is valid as + long as the string object is kept alive. (But don’t use it to modify the + string object! If you need this, use bytearray or other official + techniques.) + - PyPy 5.4 can now pass a byte string directly to a char * argument (in older + versions, a copy would be made). This used to be a CPython-only + optimization. + - ffi.gc(p, None) removes the destructor on an object previously created by + another call to ffi.gc() + - bool(ffi.cast("primitive type", x)) now returns False if the value is zero + (including -0.0), and True otherwise. Previously this would only return + False for cdata objects of a pointer type when the pointer is NULL. + - bytearrays: ffi.from_buffer(bytearray-object) is now supported. (The reason + it was not supported was that it was hard to do in PyPy, but it works since + PyPy 5.3.) To call a C function with a char * argument from a buffer + object—now including bytearrays—you write lib.foo(ffi.from_buffer(x)). + Additionally, this is now supported: p[0:length] = bytearray-object. The + problem with this was that a iterating over bytearrays gives numbers + instead of characters. (Now it is implemented with just a memcpy, of + course, not actually iterating over the characters.) + - C++: compiling the generated C code with C++ was supposed to work, but + failed if you make use the bool type (because that is rendered as the C + _Bool type, which doesn’t exist in C++). + - help(lib) and help(lib.myfunc) now give useful information, as well as + dir(p) where p is a struct or pointer-to-struct. +- drop upstreamed python-cffi-avoid-bitshifting-negative-int.patch + +------------------------------------------------------------------- +Tue Dec 6 14:39:52 UTC 2016 - jmate...@suse.com + +- update for multipython build + +------------------------------------------------------------------- Old: ---- cffi-1.6.0.tar.gz python-cffi-avoid-bitshifting-negative-int.patch New: ---- cffi-1.9.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cffi.spec ++++++ --- /var/tmp/diff_new_pack.64EyQ6/_old 2017-04-19 18:03:57.116181962 +0200 +++ /var/tmp/diff_new_pack.64EyQ6/_new 2017-04-19 18:03:57.116181962 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-cffi # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 @@ -16,58 +16,50 @@ # -Name: python-cffi -Version: 1.6.0 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define modname cffi +Name: python-%{modname} +Version: 1.9.1 Release: 0 Summary: Foreign Function Interface for Python calling C code License: MIT Group: Development/Languages/Python -Url: http://cffi.readthedocs.org -Source0: https://pypi.io/packages/source/c/cffi/cffi-%{version}.tar.gz +Url: http://%{modname}.readthedocs.org +Source0: https://files.pythonhosted.org/packages/source/c/%{modname}/%{modname}-%{version}.tar.gz Source1: python-cffi-rpmlintrc -# PATCH-FIX-UPSTREAM python-cffi-avoid-bitshifting-negative-int.patch boo#981848 badshah...@gmail.com -- Use bitwise AND instead of bitshifts to test for integer types; patch submitted upstream -Patch0: python-cffi-avoid-bitshifting-negative-int.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: gcc-c++ -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: python-rpm-macros # Documentation requirements: -BuildRequires: python-Sphinx -BuildRequires: python-pycparser -BuildRequires: python-pytest +BuildRequires: %{python_module pycparser} +BuildRequires: %{python_module pytest} Requires: python-pycparser BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -BuildRequires: libffi43-devel -%else BuildRequires: pkgconfig(libffi) -%endif + +%python_subpackages %description Foreign Function Interface for Python calling C code. The aim of this project is to provide a convenient and reliable way of calling C code from Python. %prep -%setup -q -n cffi-%{version} -%patch0 -p1 +%setup -q -n %{modname}-%{version} %build -CFLAGS="%{optflags}" python setup.py build -python setup.py build_sphinx && rm build/sphinx/html/.buildinfo +export CFLAGS="%{optflags}" +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -# tests fail on SLE11 i586, so skip them -# TODO recheck with version > 1.1.0 -%if 0%{?suse_version} > 1110 %check -PYTHONPATH=%{buildroot}%{python_sitearch} py.test -%endif +%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} py.test-%$python_bin_suffix -%files +%files %{python_files} %defattr(-,root,root,-) -%doc LICENSE build/sphinx/html/ +%doc LICENSE %{python_sitearch}/* %changelog ++++++ cffi-1.6.0.tar.gz -> cffi-1.9.1.tar.gz ++++++ ++++ 4320 lines of diff (skipped) ++++++ python-cffi-rpmlintrc ++++++ --- /var/tmp/diff_new_pack.64EyQ6/_old 2017-04-19 18:03:57.308154806 +0200 +++ /var/tmp/diff_new_pack.64EyQ6/_new 2017-04-19 18:03:57.308154806 +0200 @@ -1,3 +1,4 @@ # cffi specifically installs C headers in site-packages, so : addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/parse_c_type.h") addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/_cffi_include.h") +addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/_embedding.h")