diff options
-rw-r--r-- | dev-python/zope-size/Manifest | 1 | ||||
-rw-r--r-- | dev-python/zope-size/metadata.xml | 24 | ||||
-rw-r--r-- | dev-python/zope-size/zope-size-4.4.ebuild | 47 |
3 files changed, 72 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <name>Julien Roy</name> + <email>julien@jroy.ca</email> + </maintainer> + <longdescription> + 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. + </longdescription> + <upstream> + <maintainer> + <name>Zope Foundation and Contributors</name> + <email>zope-dev@zope.org</email> + </maintainer> + <bugs-to>https://github.com/zopefoundation/zope.size/issues</bugs-to> + <changelog>https://github.com/zopefoundation/zope.size/blob/master/CHANGES.rst</changelog> + <doc>https://zopesize.readthedocs.io</doc> + <remote-id type="github">zopefoundation/zope.size</remote-id> + <remote-id type="pypi">zope.zize</remote-id> + </upstream> +</pkgmetadata> 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 +} |