From e4fc17c58c62d72906e91c88eb29d343b4d82cef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 23 Aug 2015 18:06:06 +0200 Subject: [PATCH] dev-python/pypy*: Fix pkg_{pretend,setup} not to run for binpkgs Package-Manager: portage-2.2.20 --- dev-python/pypy-bin/pypy-bin-2.4.0.ebuild | 4 +- dev-python/pypy-bin/pypy-bin-2.5.1-r1.ebuild | 4 +- dev-python/pypy-bin/pypy-bin-2.6.0-r1.ebuild | 4 +- dev-python/pypy/pypy-2.4.0.ebuild | 58 +++++++++++--------- dev-python/pypy/pypy-2.5.1.ebuild | 58 +++++++++++--------- dev-python/pypy/pypy-2.6.0.ebuild | 58 +++++++++++--------- dev-python/pypy3/pypy3-2.4.0.ebuild | 42 +++++++------- 7 files changed, 125 insertions(+), 103 deletions(-) diff --git a/dev-python/pypy-bin/pypy-bin-2.4.0.ebuild b/dev-python/pypy-bin/pypy-bin-2.4.0.ebuild index 69201aab63c6..3f298b8ba69f 100644 --- a/dev-python/pypy-bin/pypy-bin-2.4.0.ebuild +++ b/dev-python/pypy-bin/pypy-bin-2.4.0.ebuild @@ -76,7 +76,9 @@ PDEPEND="app-admin/python-updater" S=${WORKDIR}/pypy-${PV}-src pkg_setup() { - use doc && python-any-r1_pkg_setup + if [[ ${MERGE_TYPE} != binary ]]; then + use doc && python-any-r1_pkg_setup + fi } src_prepare() { diff --git a/dev-python/pypy-bin/pypy-bin-2.5.1-r1.ebuild b/dev-python/pypy-bin/pypy-bin-2.5.1-r1.ebuild index 8937e447c283..2610c6965745 100644 --- a/dev-python/pypy-bin/pypy-bin-2.5.1-r1.ebuild +++ b/dev-python/pypy-bin/pypy-bin-2.5.1-r1.ebuild @@ -76,7 +76,9 @@ PDEPEND="app-admin/python-updater" S=${WORKDIR}/pypy-${PV}-src pkg_setup() { - use doc && python-any-r1_pkg_setup + if [[ ${MERGE_TYPE} != binary ]]; then + use doc && python-any-r1_pkg_setup + fi } src_prepare() { diff --git a/dev-python/pypy-bin/pypy-bin-2.6.0-r1.ebuild b/dev-python/pypy-bin/pypy-bin-2.6.0-r1.ebuild index e32a5a3e37b4..bc165d35aba2 100644 --- a/dev-python/pypy-bin/pypy-bin-2.6.0-r1.ebuild +++ b/dev-python/pypy-bin/pypy-bin-2.6.0-r1.ebuild @@ -78,7 +78,9 @@ PDEPEND="app-admin/python-updater" S=${WORKDIR}/pypy-${PV}-src pkg_setup() { - use doc && python-any-r1_pkg_setup + if [[ ${MERGE_TYPE} != binary ]]; then + use doc && python-any-r1_pkg_setup + fi } src_prepare() { diff --git a/dev-python/pypy/pypy-2.4.0.ebuild b/dev-python/pypy/pypy-2.4.0.ebuild index 71abed3b6c9d..e57a65c2bde6 100644 --- a/dev-python/pypy/pypy-2.4.0.ebuild +++ b/dev-python/pypy/pypy-2.4.0.ebuild @@ -39,42 +39,46 @@ PDEPEND="app-admin/python-updater" S="${WORKDIR}/${P}-src" pkg_pretend() { - if use low-memory; then - if ! python_is_installed pypy; then - eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" - eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" - eerror - eerror " $ emerge -1v dev-python/pypy-bin" - eerror - eerror "before attempting to build dev-python/pypy[low-memory]." - die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" + if [[ ${MERGE_TYPE} != binary ]]; then + if use low-memory; then + if ! python_is_installed pypy; then + eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" + eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" + eerror + eerror " $ emerge -1v dev-python/pypy-bin" + eerror + eerror "before attempting to build dev-python/pypy[low-memory]." + die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" + fi + + CHECKREQS_MEMORY="1750M" + use amd64 && CHECKREQS_MEMORY="3500M" + else + CHECKREQS_MEMORY="3G" + use amd64 && CHECKREQS_MEMORY="6G" fi - CHECKREQS_MEMORY="1750M" - use amd64 && CHECKREQS_MEMORY="3500M" - else - CHECKREQS_MEMORY="3G" - use amd64 && CHECKREQS_MEMORY="6G" + check-reqs_pkg_pretend fi - - check-reqs_pkg_pretend } pkg_setup() { - pkg_pretend + if [[ ${MERGE_TYPE} != binary ]]; then + pkg_pretend - if python_is_installed pypy; then - if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then - einfo "Using already-installed PyPy to perform the translation." - local EPYTHON=pypy - else - einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" - einfo "recommends using PyPy for that. If you wish to do so, please unset" - einfo "the EPYTHON variable." + if python_is_installed pypy; then + if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then + einfo "Using already-installed PyPy to perform the translation." + local EPYTHON=pypy + else + einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" + einfo "recommends using PyPy for that. If you wish to do so, please unset" + einfo "the EPYTHON variable." + fi fi - fi - python-any-r1_pkg_setup + python-any-r1_pkg_setup + fi } src_prepare() { diff --git a/dev-python/pypy/pypy-2.5.1.ebuild b/dev-python/pypy/pypy-2.5.1.ebuild index ac264098b20d..0e367df58e67 100644 --- a/dev-python/pypy/pypy-2.5.1.ebuild +++ b/dev-python/pypy/pypy-2.5.1.ebuild @@ -39,42 +39,46 @@ PDEPEND="app-admin/python-updater" S="${WORKDIR}/${P}-src" pkg_pretend() { - if use low-memory; then - if ! python_is_installed pypy; then - eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" - eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" - eerror - eerror " $ emerge -1v dev-python/pypy-bin" - eerror - eerror "before attempting to build dev-python/pypy[low-memory]." - die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" + if [[ ${MERGE_TYPE} != binary ]]; then + if use low-memory; then + if ! python_is_installed pypy; then + eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" + eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" + eerror + eerror " $ emerge -1v dev-python/pypy-bin" + eerror + eerror "before attempting to build dev-python/pypy[low-memory]." + die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" + fi + + CHECKREQS_MEMORY="1750M" + use amd64 && CHECKREQS_MEMORY="3500M" + else + CHECKREQS_MEMORY="3G" + use amd64 && CHECKREQS_MEMORY="6G" fi - CHECKREQS_MEMORY="1750M" - use amd64 && CHECKREQS_MEMORY="3500M" - else - CHECKREQS_MEMORY="3G" - use amd64 && CHECKREQS_MEMORY="6G" + check-reqs_pkg_pretend fi - - check-reqs_pkg_pretend } pkg_setup() { - pkg_pretend + if [[ ${MERGE_TYPE} != binary ]]; then + pkg_pretend - if python_is_installed pypy; then - if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then - einfo "Using already-installed PyPy to perform the translation." - local EPYTHON=pypy - else - einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" - einfo "recommends using PyPy for that. If you wish to do so, please unset" - einfo "the EPYTHON variable." + if python_is_installed pypy; then + if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then + einfo "Using already-installed PyPy to perform the translation." + local EPYTHON=pypy + else + einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" + einfo "recommends using PyPy for that. If you wish to do so, please unset" + einfo "the EPYTHON variable." + fi fi - fi - python-any-r1_pkg_setup + python-any-r1_pkg_setup + fi } src_prepare() { diff --git a/dev-python/pypy/pypy-2.6.0.ebuild b/dev-python/pypy/pypy-2.6.0.ebuild index 18a8810327d8..1fa41e113cef 100644 --- a/dev-python/pypy/pypy-2.6.0.ebuild +++ b/dev-python/pypy/pypy-2.6.0.ebuild @@ -42,42 +42,46 @@ PDEPEND="app-admin/python-updater" S="${WORKDIR}/${P}-src" pkg_pretend() { - if use low-memory; then - if ! python_is_installed pypy; then - eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" - eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" - eerror - eerror " $ emerge -1v dev-python/pypy-bin" - eerror - eerror "before attempting to build dev-python/pypy[low-memory]." - die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" + if [[ ${MERGE_TYPE} != binary ]]; then + if use low-memory; then + if ! python_is_installed pypy; then + eerror "USE=low-memory requires a (possibly old) version of dev-python/pypy" + eerror "or dev-python/pypy-bin being installed. Please install it using e.g.:" + eerror + eerror " $ emerge -1v dev-python/pypy-bin" + eerror + eerror "before attempting to build dev-python/pypy[low-memory]." + die "dev-python/pypy-bin (or dev-python/pypy) needs to be installed for USE=low-memory" + fi + + CHECKREQS_MEMORY="1750M" + use amd64 && CHECKREQS_MEMORY="3500M" + else + CHECKREQS_MEMORY="3G" + use amd64 && CHECKREQS_MEMORY="6G" fi - CHECKREQS_MEMORY="1750M" - use amd64 && CHECKREQS_MEMORY="3500M" - else - CHECKREQS_MEMORY="3G" - use amd64 && CHECKREQS_MEMORY="6G" + check-reqs_pkg_pretend fi - - check-reqs_pkg_pretend } pkg_setup() { - pkg_pretend + if [[ ${MERGE_TYPE} != binary ]]; then + pkg_pretend - if python_is_installed pypy; then - if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then - einfo "Using already-installed PyPy to perform the translation." - local EPYTHON=pypy - else - einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" - einfo "recommends using PyPy for that. If you wish to do so, please unset" - einfo "the EPYTHON variable." + if python_is_installed pypy; then + if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] || use low-memory; then + einfo "Using already-installed PyPy to perform the translation." + local EPYTHON=pypy + else + einfo "Using ${EPYTHON} to perform the translation. Please note that upstream" + einfo "recommends using PyPy for that. If you wish to do so, please unset" + einfo "the EPYTHON variable." + fi fi - fi - python-any-r1_pkg_setup + python-any-r1_pkg_setup + fi } src_prepare() { diff --git a/dev-python/pypy3/pypy3-2.4.0.ebuild b/dev-python/pypy3/pypy3-2.4.0.ebuild index 9903c1bc0026..85b260bf315e 100644 --- a/dev-python/pypy3/pypy3-2.4.0.ebuild +++ b/dev-python/pypy3/pypy3-2.4.0.ebuild @@ -41,32 +41,36 @@ PDEPEND="app-admin/python-updater" S="${WORKDIR}/${P}-src" pkg_pretend() { - if use low-memory; then - CHECKREQS_MEMORY="1750M" - use amd64 && CHECKREQS_MEMORY="3500M" - else - CHECKREQS_MEMORY="3G" - use amd64 && CHECKREQS_MEMORY="6G" + if [[ ${MERGE_TYPE} != binary ]]; then + if use low-memory; then + CHECKREQS_MEMORY="1750M" + use amd64 && CHECKREQS_MEMORY="3500M" + else + CHECKREQS_MEMORY="3G" + use amd64 && CHECKREQS_MEMORY="6G" + fi fi check-reqs_pkg_pretend } pkg_setup() { - pkg_pretend - - # unset to allow forcing pypy below :) - use low-memory && local EPYTHON= - if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then - einfo "Using PyPy to perform the translation." - local EPYTHON=pypy - else - einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream" - einfo "recommends using PyPy for that. If you wish to do so, please install" - einfo "virtual/pypy and ensure that EPYTHON variable is unset." - fi + if [[ ${MERGE_TYPE} != binary ]]; then + pkg_pretend + + # unset to allow forcing pypy below :) + use low-memory && local EPYTHON= + if python_is_installed pypy && [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]]; then + einfo "Using PyPy to perform the translation." + local EPYTHON=pypy + else + einfo "Using ${EPYTHON:-python2} to perform the translation. Please note that upstream" + einfo "recommends using PyPy for that. If you wish to do so, please install" + einfo "virtual/pypy and ensure that EPYTHON variable is unset." + fi - python-any-r1_pkg_setup + python-any-r1_pkg_setup + fi } src_prepare() { -- 2.26.2