From 25e68f41767330c66f25b5b39d7437ecdaf35966 Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Mon, 6 Feb 2023 20:48:38 -0500 Subject: dev-python/zope-size: new package, add 4.4 Signed-off-by: Julien Roy --- dev-python/zope-size/Manifest | 1 + dev-python/zope-size/metadata.xml | 24 ++++++++++++++++ dev-python/zope-size/zope-size-4.4.ebuild | 47 +++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 dev-python/zope-size/Manifest create mode 100644 dev-python/zope-size/metadata.xml create mode 100644 dev-python/zope-size/zope-size-4.4.ebuild diff --git a/dev-python/zope-size/Manifest b/dev-python/zope-size/Manifest new file mode 100644 index 0000000..601be3c --- /dev/null +++ b/dev-python/zope-size/Manifest @@ -0,0 +1 @@ +DIST zope-size-4.4.gh.tar.gz 13588 BLAKE2B a98b07613481f902031eeb56c14dc3b9806940944e274efc391ff50bbe4c92e11bd33854cdc8ef885d1024842ff957cd5c45975a44a61c06da583f0a1ad40ba2 SHA512 f1d98b3f46f5a8809e19b5dad57d01163c3a084fbbaadd3fadfe98dcdf9bfa6e8daafc1b06e9b2098168cef944ea53efb396a5eef396bca6acc44af4a2e8985e diff --git a/dev-python/zope-size/metadata.xml b/dev-python/zope-size/metadata.xml new file mode 100644 index 0000000..3ad094d --- /dev/null +++ b/dev-python/zope-size/metadata.xml @@ -0,0 +1,24 @@ + + + + + Julien Roy + julien@jroy.ca + + + This package provides a definition of simple interface that allows applications to retrieve the size of the object for displaying and for sorting. + + The default adapter is also provided. It expects objects to have the getSize method that returns size in bytes. However, the adapter won't crash if an object doesn't have one and will show size as "not available" instead. + + + + Zope Foundation and Contributors + zope-dev@zope.org + + https://github.com/zopefoundation/zope.size/issues + https://github.com/zopefoundation/zope.size/blob/master/CHANGES.rst + https://zopesize.readthedocs.io + zopefoundation/zope.size + zope.zize + + diff --git a/dev-python/zope-size/zope-size-4.4.ebuild b/dev-python/zope-size/zope-size-4.4.ebuild new file mode 100644 index 0000000..6144003 --- /dev/null +++ b/dev-python/zope-size/zope-size-4.4.ebuild @@ -0,0 +1,47 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) + +inherit distutils-r1 + +DESCRIPTION="Simple interface and default adapter for retrieving the size of an object" +HOMEPAGE="https://github.com/zopefoundation/zope.size" +SRC_URI="https://github.com/zopefoundation/zope.size/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/${PN/-/\.}-${PV}" + +LICENSE="ZPL" +SLOT="0" +KEYWORDS="~amd64" +# Zope Testrunner +RESTRICT="test" + +RDEPEND=" + dev-python/zope-component[${PYTHON_USEDEP}] + dev-python/zope-configuration[${PYTHON_USEDEP}] + dev-python/zope-security[${PYTHON_USEDEP}] + doc? ( dev-python/repoze-sphinx-autointerface[${PYTHON_USEDEP}] ) +" +DEPEND="${RDEPEND}" + +distutils_enable_sphinx docs +distutils_enable_tests unittest + +src_prepare() { + # strip rdep specific to namespaces + sed -i -e "/'setuptools'/d" setup.py || die + distutils-r1_src_prepare +} + +python_compile() { + distutils-r1_python_compile + find "${BUILD_DIR}" -name '*.pth' -delete || die +} + +src_test() { + cd "${S}/src/zope/untrustedpython" || die + distutils-r1_src_test +} -- cgit v1.2.3