pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/py27-cffi



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun Nov  5 13:36:15 UTC 2023

Added Files:
        pkgsrc/devel/py27-cffi: DESCR Makefile PLIST distinfo
        pkgsrc/devel/py27-cffi/patches: patch-testing_cffi0_test__verify.py
            patch-testing_cffi1_test__verify1.py

Log Message:
devel/py27-cffi: import py-cffi-1.15.1

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. The interface is based on LuaJIT's FFI and
follows a few principles:

o The goal is to call C code from Python. You should be able to do
  so without learning a 3rd language: every alternative requires
  you to learn their own language (Cython, SWIG) or API (ctypes).
  So we tried to assume that you know Python and C and minimize
  the extra bits of API that you need to learn.
o Keep all the Python-related logic in Python so that you don't
  need to write much C code.
o Work either at the level of the ABI (Application Binary Interface)
  or the API (Application Programming Interface). Usually, C
  libraries have a specified C API but often not an ABI.
o We try to be complete. For now some C99 constructs are not
  supported, but all C89 should be, including macros.
o We attempt to support both PyPy and CPython, with a reasonable
  path for other Python implementations like IronPython and Jython.
o Note that this project is not about embedding executable C code
  in Python, unlike Weave. This is about calling existing C libraries
  from Python.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py27-cffi/DESCR \
    pkgsrc/devel/py27-cffi/Makefile pkgsrc/devel/py27-cffi/PLIST \
    pkgsrc/devel/py27-cffi/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/py27-cffi/patches/patch-testing_cffi0_test__verify.py \
    pkgsrc/devel/py27-cffi/patches/patch-testing_cffi1_test__verify1.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/devel/py27-cffi/DESCR
diff -u /dev/null pkgsrc/devel/py27-cffi/DESCR:1.1
--- /dev/null   Sun Nov  5 13:36:15 2023
+++ pkgsrc/devel/py27-cffi/DESCR        Sun Nov  5 13:36:15 2023
@@ -0,0 +1,22 @@
+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. The interface is based on LuaJIT's FFI and
+follows a few principles:
+
+o The goal is to call C code from Python. You should be able to do
+  so without learning a 3rd language: every alternative requires
+  you to learn their own language (Cython, SWIG) or API (ctypes).
+  So we tried to assume that you know Python and C and minimize
+  the extra bits of API that you need to learn.
+o Keep all the Python-related logic in Python so that you don't
+  need to write much C code.
+o Work either at the level of the ABI (Application Binary Interface)
+  or the API (Application Programming Interface). Usually, C
+  libraries have a specified C API but often not an ABI.
+o We try to be complete. For now some C99 constructs are not
+  supported, but all C89 should be, including macros.
+o We attempt to support both PyPy and CPython, with a reasonable
+  path for other Python implementations like IronPython and Jython.
+o Note that this project is not about embedding executable C code
+  in Python, unlike Weave. This is about calling existing C libraries
+  from Python.
Index: pkgsrc/devel/py27-cffi/Makefile
diff -u /dev/null pkgsrc/devel/py27-cffi/Makefile:1.1
--- /dev/null   Sun Nov  5 13:36:15 2023
+++ pkgsrc/devel/py27-cffi/Makefile     Sun Nov  5 13:36:15 2023
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1 2023/11/05 13:36:15 wiz Exp $
+
+DISTNAME=      cffi-1.15.1
+PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES=    devel python
+MASTER_SITES=  ${MASTER_SITE_PYPI:=c/cffi/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://cffi.readthedocs.io/
+COMMENT=       Foreign Function Interface for Python calling C code
+LICENSE=       mit
+
+USE_LANGUAGES= c c++ # c++ for testing only
+USE_TOOLS+=    pkg-config
+
+DEPENDS+=      ${PYPKGPREFIX}-cparser-[0-9]*:../../devel/py-cparser
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test4
+
+PYTHON_VERSIONS_ACCEPTED=      27
+
+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} pytest-${PYVERSSUFFIX} testing
+
+.include "../../devel/libffi/buildlink3.mk"
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/py27-cffi/PLIST
diff -u /dev/null pkgsrc/devel/py27-cffi/PLIST:1.1
--- /dev/null   Sun Nov  5 13:36:15 2023
+++ pkgsrc/devel/py27-cffi/PLIST        Sun Nov  5 13:36:15 2023
@@ -0,0 +1,61 @@
+@comment $NetBSD: PLIST,v 1.1 2023/11/05 13:36:15 wiz Exp $
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
+${PYSITELIB}/${EGG_INFODIR}/not-zip-safe
+${PYSITELIB}/${EGG_INFODIR}/requires.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/_cffi_backend.so
+${PYSITELIB}/cffi/__init__.py
+${PYSITELIB}/cffi/__init__.pyc
+${PYSITELIB}/cffi/__init__.pyo
+${PYSITELIB}/cffi/_cffi_errors.h
+${PYSITELIB}/cffi/_cffi_include.h
+${PYSITELIB}/cffi/_embedding.h
+${PYSITELIB}/cffi/api.py
+${PYSITELIB}/cffi/api.pyc
+${PYSITELIB}/cffi/api.pyo
+${PYSITELIB}/cffi/backend_ctypes.py
+${PYSITELIB}/cffi/backend_ctypes.pyc
+${PYSITELIB}/cffi/backend_ctypes.pyo
+${PYSITELIB}/cffi/cffi_opcode.py
+${PYSITELIB}/cffi/cffi_opcode.pyc
+${PYSITELIB}/cffi/cffi_opcode.pyo
+${PYSITELIB}/cffi/commontypes.py
+${PYSITELIB}/cffi/commontypes.pyc
+${PYSITELIB}/cffi/commontypes.pyo
+${PYSITELIB}/cffi/cparser.py
+${PYSITELIB}/cffi/cparser.pyc
+${PYSITELIB}/cffi/cparser.pyo
+${PYSITELIB}/cffi/error.py
+${PYSITELIB}/cffi/error.pyc
+${PYSITELIB}/cffi/error.pyo
+${PYSITELIB}/cffi/ffiplatform.py
+${PYSITELIB}/cffi/ffiplatform.pyc
+${PYSITELIB}/cffi/ffiplatform.pyo
+${PYSITELIB}/cffi/lock.py
+${PYSITELIB}/cffi/lock.pyc
+${PYSITELIB}/cffi/lock.pyo
+${PYSITELIB}/cffi/model.py
+${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
+${PYSITELIB}/cffi/setuptools_ext.py
+${PYSITELIB}/cffi/setuptools_ext.pyc
+${PYSITELIB}/cffi/setuptools_ext.pyo
+${PYSITELIB}/cffi/vengine_cpy.py
+${PYSITELIB}/cffi/vengine_cpy.pyc
+${PYSITELIB}/cffi/vengine_cpy.pyo
+${PYSITELIB}/cffi/vengine_gen.py
+${PYSITELIB}/cffi/vengine_gen.pyc
+${PYSITELIB}/cffi/vengine_gen.pyo
+${PYSITELIB}/cffi/verifier.py
+${PYSITELIB}/cffi/verifier.pyc
+${PYSITELIB}/cffi/verifier.pyo
Index: pkgsrc/devel/py27-cffi/distinfo
diff -u /dev/null pkgsrc/devel/py27-cffi/distinfo:1.1
--- /dev/null   Sun Nov  5 13:36:15 2023
+++ pkgsrc/devel/py27-cffi/distinfo     Sun Nov  5 13:36:15 2023
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2023/11/05 13:36:15 wiz Exp $
+
+BLAKE2s (cffi-1.15.1.tar.gz) = 7407a99480cab9e973f7a8f82c0995a7639f2bd59cf5cfc6b10235a27aa2e5e6
+SHA512 (cffi-1.15.1.tar.gz) = e99cafcb029076abc29e435b490fa0573ee2856f4051b7ca8a5b38cd125d56dd9dae8b189f59ceb3d728a675da8ee83239e09e19f8b0feeddea4b186ab5173a5
+Size (cffi-1.15.1.tar.gz) = 508501 bytes
+SHA1 (patch-testing_cffi0_test__verify.py) = 91e903aa6aa89f997aba1578cb9452e6ac160f50
+SHA1 (patch-testing_cffi1_test__verify1.py) = 72d564ff8422bc1c8ed8b7058fb95ca669b69529

Index: pkgsrc/devel/py27-cffi/patches/patch-testing_cffi0_test__verify.py
diff -u /dev/null pkgsrc/devel/py27-cffi/patches/patch-testing_cffi0_test__verify.py:1.1
--- /dev/null   Sun Nov  5 13:36:15 2023
+++ pkgsrc/devel/py27-cffi/patches/patch-testing_cffi0_test__verify.py  Sun Nov  5 13:36:15 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-testing_cffi0_test__verify.py,v 1.1 2023/11/05 13:36:15 wiz Exp $
+
+Add NetBSD support.
+
+--- testing/cffi0/test_verify.py.orig  2017-07-03 17:44:02.180970759 +0000
++++ testing/cffi0/test_verify.py
+@@ -1798,7 +1798,7 @@ def test_callback_indirection():
+         #include <malloc.h>
+         #define alloca _alloca
+         #else
+-        # ifdef __FreeBSD__
++        # if defined(__FreeBSD__) || defined(__NetBSD__)
+         #  include <stdlib.h>
+         # else
+         #  include <alloca.h>
Index: pkgsrc/devel/py27-cffi/patches/patch-testing_cffi1_test__verify1.py
diff -u /dev/null pkgsrc/devel/py27-cffi/patches/patch-testing_cffi1_test__verify1.py:1.1
--- /dev/null   Sun Nov  5 13:36:15 2023
+++ pkgsrc/devel/py27-cffi/patches/patch-testing_cffi1_test__verify1.py Sun Nov  5 13:36:15 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-testing_cffi1_test__verify1.py,v 1.1 2023/11/05 13:36:15 wiz Exp $
+
+Add NetBSD support.
+
+--- testing/cffi1/test_verify1.py.orig 2017-07-03 17:44:21.313824096 +0000
++++ testing/cffi1/test_verify1.py
+@@ -1767,7 +1767,7 @@ def test_callback_indirection():
+         #include <malloc.h>
+         #define alloca _alloca
+         #else
+-        # ifdef __FreeBSD__
++        # if defined(__FreeBSD__) || defined(__NetBSD__)
+         #  include <stdlib.h>
+         # else
+         #  include <alloca.h>



Home | Main Index | Thread Index | Old Index