diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-01-22 12:49:32 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-01-22 12:49:32 +0000 |
| commit | 0ea3d490083ad8783ecd547e4e43a18c9d6e27e3 (patch) | |
| tree | 61054bf63a6e19fab360b6a794b209684a894425 /dev-python/pkgcraft-python/pkgcraft-python-0.0.3.ebuild | |
| parent | 0502cddb6ab6b7a42a2a224efcd653839f69f176 (diff) | |
| download | baldeagleos-repo-0ea3d490083ad8783ecd547e4e43a18c9d6e27e3.tar.gz baldeagleos-repo-0ea3d490083ad8783ecd547e4e43a18c9d6e27e3.tar.xz baldeagleos-repo-0ea3d490083ad8783ecd547e4e43a18c9d6e27e3.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pkgcraft-python/pkgcraft-python-0.0.3.ebuild')
| -rw-r--r-- | dev-python/pkgcraft-python/pkgcraft-python-0.0.3.ebuild | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/dev-python/pkgcraft-python/pkgcraft-python-0.0.3.ebuild b/dev-python/pkgcraft-python/pkgcraft-python-0.0.3.ebuild new file mode 100644 index 000000000000..18b5c4eb6c8d --- /dev/null +++ b/dev-python/pkgcraft-python/pkgcraft-python-0.0.3.ebuild @@ -0,0 +1,74 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} ) + +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" + inherit git-r3 + + PKGCRAFT_VERSION_MIN="9999" + PKGCRAFT_VERSION_MAX="9999" +else + SRC_URI="https://github.com/pkgcraft/pkgcraft-python/releases/download/v${PV}/${P/-python}.tar.gz" + S="${WORKDIR}"/${P/-python} + + KEYWORDS="~amd64" + + PKGCRAFT_VERSION_MIN="0.0.4" +fi + +LICENSE="BSD-1" +SLOT="0" +IUSE="+examples" + +RDEPEND=" + >=sys-libs/pkgcraft-${PKGCRAFT_VERSION_MIN}:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-python/cython + dev-python/setuptools_scm + 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 + 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 +} |
