Skip to content

Commit

Permalink
net-libs/libwally-core: re-enable python3_12
Browse files Browse the repository at this point in the history
But require >=dev-lang/python-3.12.0_rc2:3.12, as tests fail under rc1.

Also:
 * set DISTUTILS_EXT=1 to suppress a QA warning;
 * python_check_deps(): only require Sphinx in compile phase.

See: ElementsProject/libwally-core#409 (comment)
  • Loading branch information
whitslack committed Sep 11, 2023
1 parent 3c82434 commit 466bcb5
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 8 deletions.
20 changes: 18 additions & 2 deletions net-libs/libwally-core/libwally-core-0.8.8.ebuild
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
EAPI=8

PYTHON_COMPAT=( python3_{10..11} )
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_EXT=1

inherit autotools backports check-reqs distutils-r1 java-pkg-opt-2 multilib-minimal

Expand Down Expand Up @@ -70,8 +71,23 @@ PATCHES=(
"${FILESDIR}/0.8.8-python-module-dynamic-link.patch"
)

# https://github.com/ElementsProject/libwally-core/pull/409#issuecomment-1713069590
RDEPEND="${RDEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"
DEPEND="${DEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"
BDEPEND="${BDEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"

distutils_enable_sphinx docs/source dev-python/sphinx-rtd-theme

eval "distutils-r1_$(declare -f python_check_deps)"
python_check_deps() {
case "${EBUILD_PHASE}" in
compile)
distutils-r1_python_check_deps ;;
test)
[[ "${EPYTHON}" != 'python3.12' ]] || python_has_version '>=dev-lang/python-3.12.0_rc2:3.12' ;;
esac
}

pkg_pretend() {
if has_version "<${CATEGORY}/${PN}-0.8.2" &&
[[ -x "${EROOT%/}/usr/bin/lightningd" ]] &&
Expand Down
20 changes: 18 additions & 2 deletions net-libs/libwally-core/libwally-core-0.9.0.ebuild
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
EAPI=8

PYTHON_COMPAT=( python3_{10..11} )
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_EXT=1

inherit autotools backports check-reqs distutils-r1 java-pkg-opt-2 multilib-minimal

Expand Down Expand Up @@ -69,8 +70,23 @@ PATCHES=(
"${FILESDIR}/0.8.8-python-module-dynamic-link.patch"
)

# https://github.com/ElementsProject/libwally-core/pull/409#issuecomment-1713069590
RDEPEND="${RDEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"
DEPEND="${DEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"
BDEPEND="${BDEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"

distutils_enable_sphinx docs/source dev-python/sphinx-rtd-theme

eval "distutils-r1_$(declare -f python_check_deps)"
python_check_deps() {
case "${EBUILD_PHASE}" in
compile)
distutils-r1_python_check_deps ;;
test)
[[ "${EPYTHON}" != 'python3.12' ]] || python_has_version '>=dev-lang/python-3.12.0_rc2:3.12' ;;
esac
}

pkg_pretend() {
if has_version "<${CATEGORY}/${PN}-0.8.2" &&
[[ -x "${EROOT%/}/usr/bin/lightningd" ]] &&
Expand Down
20 changes: 18 additions & 2 deletions net-libs/libwally-core/libwally-core-0.9.1-r1.ebuild
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
EAPI=8

PYTHON_COMPAT=( python3_{10..11} )
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_EXT=1

inherit autotools backports check-reqs distutils-r1 java-pkg-opt-2 multilib-minimal

Expand Down Expand Up @@ -70,8 +71,23 @@ PATCHES=(
"${FILESDIR}/0.8.8-python-module-dynamic-link.patch"
)

# https://github.com/ElementsProject/libwally-core/pull/409#issuecomment-1713069590
RDEPEND="${RDEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"
DEPEND="${DEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"
BDEPEND="${BDEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"

distutils_enable_sphinx docs/source dev-python/sphinx-rtd-theme

eval "distutils-r1_$(declare -f python_check_deps)"
python_check_deps() {
case "${EBUILD_PHASE}" in
compile)
distutils-r1_python_check_deps ;;
test)
[[ "${EPYTHON}" != 'python3.12' ]] || python_has_version '>=dev-lang/python-3.12.0_rc2:3.12' ;;
esac
}

pkg_pretend() {
if has_version "<${CATEGORY}/${PN}-0.8.2" &&
[[ -x "${EROOT%/}/usr/bin/lightningd" ]] &&
Expand Down
20 changes: 18 additions & 2 deletions net-libs/libwally-core/libwally-core-0.9.2.ebuild
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
EAPI=8

PYTHON_COMPAT=( python3_{10..11} )
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_EXT=1

inherit autotools backports check-reqs distutils-r1 java-pkg-opt-2 multilib-minimal

Expand Down Expand Up @@ -69,8 +70,23 @@ PATCHES=(
"${FILESDIR}/0.8.8-python-module-dynamic-link.patch"
)

# https://github.com/ElementsProject/libwally-core/pull/409#issuecomment-1713069590
RDEPEND="${RDEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"
DEPEND="${DEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"
BDEPEND="${BDEPEND//'dev-lang/python:3.12'/'>=dev-lang/python-3.12.0_rc2:3.12'}"

distutils_enable_sphinx docs/source dev-python/sphinx-rtd-theme

eval "distutils-r1_$(declare -f python_check_deps)"
python_check_deps() {
case "${EBUILD_PHASE}" in
compile)
distutils-r1_python_check_deps ;;
test)
[[ "${EPYTHON}" != 'python3.12' ]] || python_has_version '>=dev-lang/python-3.12.0_rc2:3.12' ;;
esac
}

pkg_pretend() {
if use minimal ; then
ewarn "You have enabled the ${PORTAGE_COLOR_HILITE-${HILITE}}minimal${PORTAGE_COLOR_NORMAL-${NORMAL}} USE flag, which is intended for embedded
Expand Down

0 comments on commit 466bcb5

Please sign in to comment.