diff options
| author | Michał Górny <mgorny@gentoo.org> | 2025-09-09 04:47:30 +0200 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2025-09-09 05:22:12 +0200 |
| commit | 3d907eba262001ea3f899ef6d7b492b873ff45fb (patch) | |
| tree | bb5dec94c6211654fa64bda95c4c0ffe0ae9251c /dev-python/cffi | |
| parent | 4310e3e8e8ee345bfb419c3935514e9e582e116d (diff) | |
| download | gentoo-3d907eba262001ea3f899ef6d7b492b873ff45fb.tar.gz gentoo-3d907eba262001ea3f899ef6d7b492b873ff45fb.tar.bz2 gentoo-3d907eba262001ea3f899ef6d7b492b873ff45fb.zip | |
dev-python/cffi: Bump to 2.0.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/cffi')
| -rw-r--r-- | dev-python/cffi/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/cffi/cffi-2.0.0.ebuild | 72 |
2 files changed, 73 insertions, 0 deletions
diff --git a/dev-python/cffi/Manifest b/dev-python/cffi/Manifest index 39fa548c09d0..4f331d5da390 100644 --- a/dev-python/cffi/Manifest +++ b/dev-python/cffi/Manifest @@ -1,2 +1,3 @@ DIST cffi-1.17.1.tar.gz 516621 BLAKE2B 902844a14c0765ada6adf5054a9462a195b49b2ea4d7441deeff97dd6d9209accd29257697002ee1bad7e143ebf983a2d98077b17e08b060dd1ee75dc682e3d8 SHA512 907129891d56351ca5cb885aae62334ad432321826d6eddfaa32195b4c7b7689a80333e6d14d0aab479a646aba148b9852c0815b80344dfffa4f183a5e74372c +DIST cffi-2.0.0.tar.gz 523588 BLAKE2B 2038eb1eeb89b1015ea40202cc5dc0da62989288a41cccf75baeea86051a085e28798e75ce0a74316c2f5bd94e83e0b89d3df6b97ee0f4f61dac301e239bb3e9 SHA512 a8bf705e626f6b5858cc20e9044a23fd653d155e2a2d4cb59f1eed00ef13ebd92d5a2f07738c66b361cb24d863786d4379dcd9c176250b546fbd45758e51d4f4 DIST cffi-2.0.0b1.tar.gz 521625 BLAKE2B a62b15652e02ed62ce33cc92f6bfd4454a81a6a7c3fb84cc048fbf8cc39325af09c19f5c2a2f1e6c80063e9fc8ae6537d1b917a01f15e8e56c2bb847bd79bfac SHA512 974f724a4c819f0a32da38a7209c6f54e63810817794bab286e8721bab6c59ce50c2c0992c828af54088ff8f1dec40480ffe37155d979cadc26c79cdc6b78f54 diff --git a/dev-python/cffi/cffi-2.0.0.ebuild b/dev-python/cffi/cffi-2.0.0.ebuild new file mode 100644 index 000000000000..c83761a7bae9 --- /dev/null +++ b/dev-python/cffi/cffi-2.0.0.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# please keep this ebuild at EAPI 8 -- sys-apps/portage dep +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +# DO NOT ADD pypy to PYTHON_COMPAT +# pypy bundles a modified version of cffi. Use python_gen_cond_dep instead. +PYTHON_COMPAT=( python3_{11..14} python3_14t ) + +inherit distutils-r1 toolchain-funcs pypi + +DESCRIPTION="Foreign Function Interface for Python calling C code" +HOMEPAGE=" + https://cffi.readthedocs.io/ + https://pypi.org/project/cffi/ +" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + +# Needs recent libffi for HPPA fixes +DEPEND=" + >=dev-libs/libffi-3.4.4-r1:= +" +# setuptools as a modern distutils provider +RDEPEND=" + ${DEPEND} + dev-python/pycparser[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] +" +BDEPEND=" + ${RDEPEND} + virtual/pkgconfig + test? ( + dev-python/py[${PYTHON_USEDEP}] + ) +" + +distutils_enable_sphinx doc/source +EPYTEST_PLUGINS=() +# xdist fails to collect the tests +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/cffi-1.14.0-darwin-no-brew.patch +) + +src_prepare() { + if [[ ${CHOST} == *darwin* ]] ; then + # Don't obsessively try to find libffi + sed -i -e "s/.*\-iwithsysroot\/usr\/include\/ffi.*/\tpass/" setup.py || die + fi + distutils-r1_src_prepare +} + +src_configure() { + tc-export PKG_CONFIG +} + +python_test() { + local EPYTEST_IGNORE=( + # these tests call pip + testing/cffi0/test_zintegration.py + ) + + "${EPYTHON}" -c "import _cffi_backend as backend" || die + epytest src/c testing +} |
