summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-09-07 05:06:41 +0200
committerMichał Górny <mgorny@gentoo.org>2023-09-07 05:15:36 +0200
commit60d0dad4ebaf447e98a13c9b96889fdc3f43bf4d (patch)
treeee3e27e0164f299d3f91cda0cb1593f988b15939 /dev-python
parent525f29372f86bb1cd8e9783aa8e51228179f4433 (diff)
downloadgentoo-60d0dad4ebaf447e98a13c9b96889fdc3f43bf4d.tar.gz
gentoo-60d0dad4ebaf447e98a13c9b96889fdc3f43bf4d.tar.bz2
gentoo-60d0dad4ebaf447e98a13c9b96889fdc3f43bf4d.zip
dev-python/pkgcraft: Bump to 0.0.6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pkgcraft/Manifest1
-rw-r--r--dev-python/pkgcraft/pkgcraft-0.0.6.ebuild81
-rw-r--r--dev-python/pkgcraft/pkgcraft-9999.ebuild23
3 files changed, 95 insertions, 10 deletions
diff --git a/dev-python/pkgcraft/Manifest b/dev-python/pkgcraft/Manifest
index 682de2ec73a3..a9eb28b65b2d 100644
--- a/dev-python/pkgcraft/Manifest
+++ b/dev-python/pkgcraft/Manifest
@@ -1 +1,2 @@
DIST pkgcraft-0.0.5.tar.gz 400237 BLAKE2B de78c1570ce8080742d3afbff2c9078b56fb14e7b097bd09b47c5b21a5de1062989835c9c12e4efd9d4be4aef7e9dec1350606700d80c5482cf81d1d2c4febc0 SHA512 2366180189314cafa4be8a180eed62a8c994bfd862ebc5292e01d9cd2585b9eca082535e405924ad758d6f89309c5e64727242a52f95f6e71aa6aff3495edd57
+DIST pkgcraft-0.0.6.tar.gz 406538 BLAKE2B 5c90b57cb11e9f754cd695989994b3a9be52007482981c997f2e361fbbb72aeb0810d7f41dea1cdcd74c47840bb1c3b2cf225c967ba76b01769da93f909d9911 SHA512 ddd7bf77a3509156e8c16e5aeeb94a5f4530d9d1a3e6617d3974adfae7b46f0b0d31f4828dbd70261b42c883e776bf7572ca2fe8e23c9216637d886b9d8811cc
diff --git a/dev-python/pkgcraft/pkgcraft-0.0.6.ebuild b/dev-python/pkgcraft/pkgcraft-0.0.6.ebuild
new file mode 100644
index 000000000000..96f8ad5480d3
--- /dev/null
+++ b/dev-python/pkgcraft/pkgcraft-0.0.6.ebuild
@@ -0,0 +1,81 @@
+# Copyright 2023 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_{10..12} )
+
+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="9999"
+ 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.11"
+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 5a3929c9bc02..96f8ad5480d3 100644
--- a/dev-python/pkgcraft/pkgcraft-9999.ebuild
+++ b/dev-python/pkgcraft/pkgcraft-9999.ebuild
@@ -3,45 +3,48 @@
EAPI=8
+DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1
DESCRIPTION="Python bindings for pkgcraft"
HOMEPAGE="
https://pypi.org/project/pkgcraft/
- https://github.com/pkgcraft/pkgcraft-python
+ https://github.com/pkgcraft/pkgcraft-python/
"
if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft-python"
+ EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft-python.git"
inherit git-r3
- PKGCRAFT_VERSION_MAX="99999"
+ PKGCRAFT_VERSION_MAX="9999"
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"
+ KEYWORDS="~amd64 ~arm64"
PKGCRAFT_VERSION_MAX="9999"
- PKGCRAFT_VERSION_MIN="0.0.6"
+ PKGCRAFT_VERSION_MIN="0.0.11"
fi
LICENSE="MIT"
SLOT="0"
IUSE="+examples"
-RDEPEND="
+DEPEND="
<sys-libs/pkgcraft-${PKGCRAFT_VERSION_MAX}
>=sys-libs/pkgcraft-${PKGCRAFT_VERSION_MIN}:=
"
-DEPEND="${RDEPEND}"
+RDEPEND="
+ ${DEPEND}
+"
BDEPEND="
- >=dev-python/cython-3.0.0_beta1
- dev-python/setuptools-scm
+ >=dev-python/cython-3[${PYTHON_USEDEP}]
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
virtual/pkgconfig
"