pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-cffi py-cffi: updated to 1.12.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c7d6bdf88016
branches:  trunk
changeset: 391865:c7d6bdf88016
user:      adam <adam%pkgsrc.org@localhost>
date:      Sat Feb 16 23:37:23 2019 +0000

description:
py-cffi: updated to 1.12.1

v1.12.1
CPython 3 on Windows: we again no longer compile with Py_LIMITED_API by default because such modules still cannot be used with virtualenv. The problem is that it doesn?t work in CPython <= 3.4, and 
for technical reason we can?t enable this flag automatically based on the version of Python.

Like before, Issue 350 mentions a workaround if you still want the Py_LIMITED_API flag and either you are not concerned about virtualenv or you are sure your module will not be used on CPython <= 
3.4: pass define_macros=[("Py_LIMITED_API", None)] to the ffibuilder.set_source() call.

v1.12
Direct support for pkg-config.
ffi.from_buffer() takes a new optional first argument that gives the array type of the result. It also takes an optional keyword argument require_writable to refuse read-only Python buffers.
ffi.new(), ffi.gc() or ffi.from_buffer() cdata objects can now be released at known times, either by using the with keyword or by calling the new ffi.release().
Windows, CPython 3.x: cffi modules are linked with python3.dll again. This makes them independant on the exact CPython version, like they are on other platforms. It requires virtualenv 16.0.0.
Accept an expression like ffi.new("int[4]", p) if p is itself another cdata int[4].
CPython 2.x: ffi.dlopen() failed with non-ascii file names on Posix
CPython: if a thread is started from C and then runs Python code (with callbacks or with the embedding solution), then previous versions of cffi would contain possible crashes and/or memory leaks. 
Hopefully, this has been fixed.
Support for ffi.cdef(..., pack=N) where N is a power of two. Means to emulate #pragma pack(N) on MSVC. Also, the default on Windows is now pack=8, like on MSVC. This might make a difference in corner 
cases, although I can?t think of one in the context of CFFI. The old way ffi.cdef(..., packed=True) remains and is equivalent to pack=1 (saying e.g. that fields like int should be aligned to 1 byte 
instead of 4).

diffstat:

 devel/py-cffi/Makefile |  17 ++++++++---------
 devel/py-cffi/PLIST    |   5 ++++-
 devel/py-cffi/distinfo |  10 +++++-----
 3 files changed, 17 insertions(+), 15 deletions(-)

diffs (86 lines):

diff -r a41d2e87c4d6 -r c7d6bdf88016 devel/py-cffi/Makefile
--- a/devel/py-cffi/Makefile    Sat Feb 16 23:36:02 2019 +0000
+++ b/devel/py-cffi/Makefile    Sat Feb 16 23:37:23 2019 +0000
@@ -1,26 +1,23 @@
-# $NetBSD: Makefile,v 1.34 2018/07/29 10:48:14 leot Exp $
+# $NetBSD: Makefile,v 1.35 2019/02/16 23:37:23 adam Exp $
 
-DISTNAME=      cffi-1.11.5
+DISTNAME=      cffi-1.12.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=   1
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=c/cffi/}
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      http://cffi.readthedocs.io/en/latest/
+HOMEPAGE=      https://cffi.readthedocs.io/
 COMMENT=       Foreign Function Interface for Python calling C code
 LICENSE=       mit
 
-USE_LANGUAGES= c c++
+USE_LANGUAGES= c c++ # c++ for testing only
 USE_TOOLS+=    pkg-config
 
 DEPENDS+=      ${PYPKGPREFIX}-cparser-[0-9]*:../../devel/py-cparser
-BUILD_DEPENDS+=        ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 
-#
 # XXX: Kludge to avoid __thread that at the moment is still not properly
 # XXX: supported on NetBSD/evbarm aarch64.
-#
 .include "../../mk/bsd.prefs.mk"
 .if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "aarch64"
 BUILDLINK_TRANSFORM+=  rm:-DUSE__THREAD
@@ -28,11 +25,13 @@
 
 DISTUTILS_BUILDDIR_IN_TEST_ENV=        yes
 
+# to avoid py-hypothesis
+TEST_ENV+=     PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
 TEST_ENV+=     TMPDIR=${WRKDIR}/tmp
 
 do-test:
        ${MKDIR} ${WRKDIR}/tmp
-       cd ${WRKSRC} && ${SETENV} ${TEST_ENV} py.test-${PYVERSSUFFIX}
+       cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} testing
 
 .include "../../devel/libffi/buildlink3.mk"
 .include "../../lang/python/egg.mk"
diff -r a41d2e87c4d6 -r c7d6bdf88016 devel/py-cffi/PLIST
--- a/devel/py-cffi/PLIST       Sat Feb 16 23:36:02 2019 +0000
+++ b/devel/py-cffi/PLIST       Sat Feb 16 23:37:23 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2017/09/30 13:09:47 adam Exp $
+@comment $NetBSD: PLIST,v 1.8 2019/02/16 23:37:23 adam Exp $
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -41,6 +41,9 @@
 ${PYSITELIB}/cffi/model.pyc
 ${PYSITELIB}/cffi/model.pyo
 ${PYSITELIB}/cffi/parse_c_type.h
+${PYSITELIB}/cffi/pkgconfig.py
+${PYSITELIB}/cffi/pkgconfig.pyc
+${PYSITELIB}/cffi/pkgconfig.pyo
 ${PYSITELIB}/cffi/recompiler.py
 ${PYSITELIB}/cffi/recompiler.pyc
 ${PYSITELIB}/cffi/recompiler.pyo
diff -r a41d2e87c4d6 -r c7d6bdf88016 devel/py-cffi/distinfo
--- a/devel/py-cffi/distinfo    Sat Feb 16 23:36:02 2019 +0000
+++ b/devel/py-cffi/distinfo    Sat Feb 16 23:37:23 2019 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.30 2018/03/01 07:59:54 adam Exp $
+$NetBSD: distinfo,v 1.31 2019/02/16 23:37:23 adam Exp $
 
-SHA1 (cffi-1.11.5.tar.gz) = 1686e6689a691414d3d22626c837adeee3996dd9
-RMD160 (cffi-1.11.5.tar.gz) = d2dc3bae37502af50f756b2705d388777e7a541d
-SHA512 (cffi-1.11.5.tar.gz) = 6770d5293cfd7405e733d60c96655641b5bcc5878fc66a737f4a8308f465d459ee0e3fcaa47893d8f57fb195e5534dd7e4728c868f33d7e657688f45e1fb1880
-Size (cffi-1.11.5.tar.gz) = 438498 bytes
+SHA1 (cffi-1.12.1.tar.gz) = b4d8d74a22d0574cb056502daa2c377898f0a910
+RMD160 (cffi-1.12.1.tar.gz) = 74d3643f37c0687501bf6f546bea0cfdd4798fa4
+SHA512 (cffi-1.12.1.tar.gz) = 1863ad26d730d629e1397ba155bebd3f9edc881d661fda5301a5acb080c8e006925317c1b092f054c46834d693c437d6e91a687f379c9ab029223a9a159eaf48
+Size (cffi-1.12.1.tar.gz) = 453584 bytes
 SHA1 (patch-testing_cffi0_test__verify.py) = 91e903aa6aa89f997aba1578cb9452e6ac160f50
 SHA1 (patch-testing_cffi1_test__verify1.py) = 72d564ff8422bc1c8ed8b7058fb95ca669b69529



Home | Main Index | Thread Index | Old Index