diff options
author | Sam James <sam@gentoo.org> | 2024-06-23 01:59:51 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-23 02:01:21 +0100 |
commit | 2768225306bbb9362c4a9ee7ccfc0a3a1d09e6d5 (patch) | |
tree | e2c0478fa65c8ee7e1b310453d6df24f15647cfb /dev-python/pkgcraft | |
parent | sys-apps/pkgcraft-tools: add 0.0.15 (diff) | |
download | gentoo-2768225306bbb9362c4a9ee7ccfc0a3a1d09e6d5.tar.gz gentoo-2768225306bbb9362c4a9ee7ccfc0a3a1d09e6d5.tar.bz2 gentoo-2768225306bbb9362c4a9ee7ccfc0a3a1d09e6d5.zip |
dev-python/pkgcraft: add 0.0.10
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/pkgcraft')
-rw-r--r-- | dev-python/pkgcraft/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pkgcraft/pkgcraft-0.0.10.ebuild | 81 | ||||
-rw-r--r-- | dev-python/pkgcraft/pkgcraft-9999.ebuild | 2 |
3 files changed, 83 insertions, 1 deletions
diff --git a/dev-python/pkgcraft/Manifest b/dev-python/pkgcraft/Manifest index 46d87a4c79f0..5fe3431bf1c8 100644 --- a/dev-python/pkgcraft/Manifest +++ b/dev-python/pkgcraft/Manifest @@ -1 +1,2 @@ +DIST pkgcraft-0.0.10.tar.gz 452861 BLAKE2B f7f52e8c7c917701b08540cc8da8ee1f1ff7157b02e61d5cfa1b4ca6850ae8aac171dfdefe6ac611ce4971aff27d63614d4914178bf86c8a389e437d5fb43ba9 SHA512 1c3878256bfbeae05ceb9e7445e100a8e6601649aae634b02bdd00494075056fad014b724e2cfd76325dd06c664c1c90343f49f186c0b61bfe2d92bbed14abe4 DIST pkgcraft-0.0.9.tar.gz 431872 BLAKE2B 6c6ed1677c891c0e5579c7e28342876c2d7cbe03f2fcf3f8ad9f994302570d1d2398d2b4a55ec1a2fd82bbea518a4d2f76e9cabe760f0d9779b8d55170c1d940 SHA512 13988ff6822a5f9b715f3a9e8593a21d6ac530a91ca98790bd8a1c3e5958c97e440ce0610d25ed518f6d485837c9aded2ba145facf98e217325802777a33b3a7 diff --git a/dev-python/pkgcraft/pkgcraft-0.0.10.ebuild b/dev-python/pkgcraft/pkgcraft-0.0.10.ebuild new file mode 100644 index 000000000000..5fe6fc813ef7 --- /dev/null +++ b/dev-python/pkgcraft/pkgcraft-0.0.10.ebuild @@ -0,0 +1,81 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..13} ) + +inherit distutils-r1 + +DESCRIPTION="Python bindings for pkgcraft" +HOMEPAGE=" + https://pypi.org/project/pkgcraft/ + https://github.com/pkgcraft/pkgcraft-python/ +" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft-python.git" + inherit git-r3 + + PKGCRAFT_VERSION_MAX="99999" # extra 9 here or 9999 isn't mergable per DEPEND below + PKGCRAFT_VERSION_MIN="9999" +else + SRC_URI="https://github.com/pkgcraft/pkgcraft-python/releases/download/v${PV}/${P/-python}.tar.gz" + S="${WORKDIR}"/${P/-python} + + KEYWORDS="~amd64 ~arm64" + + PKGCRAFT_VERSION_MAX="9999" + PKGCRAFT_VERSION_MIN="0.0.15" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="+examples" + +DEPEND=" + <sys-libs/pkgcraft-${PKGCRAFT_VERSION_MAX} + >=sys-libs/pkgcraft-${PKGCRAFT_VERSION_MIN}:= +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + >=dev-python/cython-3[${PYTHON_USEDEP}] + dev-python/setuptools-scm[${PYTHON_USEDEP}] + virtual/pkgconfig +" + +distutils_enable_tests pytest + +python_prepare_all() { + if [[ ${PV} != 9999 ]] ; then + local actual_pkgcraft_min=$(sed -En '/^MIN_VERSION =/{s/[^0-9.]//gp}' setup.py || die) + if [[ ${actual_pkgcraft_min} != ${PKGCRAFT_VERSION_MIN} ]] ; then + eerror "Expected minimum pkgcraft-c version: ${PKGCRAFT_VERSION_MIN}" + eerror "Actual minimum pkgcraft-c version: ${actual_pkgcraft_min}" + die "Mismatch between setup.py's MIN_VERSION and ebuild!" + fi + fi + + distutils-r1_python_prepare_all +} + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest +} + +python_install() { + # Conditional because these aren't installed officially right now + # and the naming is just for convenience. + if use examples ; then + while IFS= read -r -d '' file ; do + python_newexe "${S}"/examples/${file##*/} pkgcraft-${file##*/} + done < <(find "${S}"/examples -type f -executable -print0 || die) + fi + + distutils-r1_python_install +} diff --git a/dev-python/pkgcraft/pkgcraft-9999.ebuild b/dev-python/pkgcraft/pkgcraft-9999.ebuild index 0e6d0142cd1c..5fe6fc813ef7 100644 --- a/dev-python/pkgcraft/pkgcraft-9999.ebuild +++ b/dev-python/pkgcraft/pkgcraft-9999.ebuild @@ -28,7 +28,7 @@ else KEYWORDS="~amd64 ~arm64" PKGCRAFT_VERSION_MAX="9999" - PKGCRAFT_VERSION_MIN="0.0.14" + PKGCRAFT_VERSION_MIN="0.0.15" fi LICENSE="MIT" |