[gentoo-dev] Last rites: dev-ruby/six
# Hans de Graaff (2023-03-18) # Ancient out-of-date package. No proper upstream release since 2011. # No reverse dependencies. Masked for removal on 2023-04-18. dev-ruby/six signature.asc Description: This is a digitally signed message part
[gentoo-dev] [PATCH 1/2] pypi.eclass: Introduce PYPI_PN to override the default project name
Introduce a convenience PYPI_PN variable that can be used to override the default project name. This is meant to be used primarily when upstream project name does not conform to Gentoo package naming rules, e.g. contains dots or uppercase letters. For example, instead of: SRC_URI="$(pypi_sdist_url --no-normalize "${PN/-/.}")" S=${WORKDIR}/${P/-/.} one can now specify: PYPI_NO_NORMALIZE=1 PYPI_PN=${PN/-/.} For PEP 625-conformant packages, instead of: SRC_URI="$(pypi_sdist_url "${PN/-/.}")" one can use: PYPI_PN=${PN/-/.} There's not much gain space-wise but it avoids having to specify the name twice. This can particularly be helpful for package names using PascalCase. Signed-off-by: Michał Górny --- eclass/pypi.eclass | 35 --- eclass/tests/pypi.sh | 3 ++- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/eclass/pypi.eclass b/eclass/pypi.eclass index 79007a2ad0ed..ca3b6f67803d 100644 --- a/eclass/pypi.eclass +++ b/eclass/pypi.eclass @@ -50,6 +50,19 @@ _PYPI_ECLASS=1 # When set to a non-empty value, disables project name normalization # for the default SRC_URI and S values. +# @ECLASS_VARIABLE: PYPI_PN +# @PRE_INHERIT +# @DESCRIPTION: +# The PyPI project name. This should be overriden scarcely, generally +# when upstream project name does not conform to Gentoo naming rules, +# e.g. when it contains dots or uppercase letters. +# +# Example use: +# @CODE +# PYPI_PN=${PN/-/.} +# @CODE +: ${PYPI_PN:=${PN}} + # @FUNCTION: pypi_normalize_name # @USAGE: # @DESCRIPTION: @@ -99,9 +112,9 @@ pypi_translate_version() { # generated using build systems that did not follow PEP 625 # (i.e. the sdist name contains uppercase letters, hyphens or dots). # -# If is unspecified, it defaults to ${PN}. The package name -# is normalized according to the specification unless `--no-normalize` -# is passed. +# If is unspecified, it defaults to ${PYPI_PN}. The package +# name is normalized according to the specification unless +# `--no-normalize` is passed. # # If is unspecified, it defaults to ${PV} translated # via pypi_translate_version. If it is specified, then it is used @@ -121,7 +134,7 @@ pypi_sdist_url() { die "Usage: ${FUNCNAME} [--no-normalize] [ []]" fi - local project=${1-"${PN}"} + local project=${1-"${PYPI_PN}"} local version=${2-"$(pypi_translate_version "${PV}")"} local suffix=${3-.tar.gz} local fn_project=${project} @@ -135,8 +148,8 @@ pypi_sdist_url() { # @DESCRIPTION: # Output the wheel filename for the specified project/version tuple. # -# If is unspecified, it defaults to ${PN}. The package name -# is normalized according to the wheel specification. +# If is unspecified, it defaults to ${PYPI_PN}. The package +# name is normalized according to the wheel specification. # # If is unspecified, it defaults to ${PV} translated # via pypi_translate_version. If it is specified, then it is used @@ -154,7 +167,7 @@ pypi_wheel_name() { die "Usage: ${FUNCNAME} [ [ []]]" fi - local project=$(pypi_normalize_name "${1-"${PN}"}") + local project=$(pypi_normalize_name "${1-"${PYPI_PN}"}") local version=${2-"$(pypi_translate_version "${PV}")"} local pytag=${3-py3} local abitag=${4-none-any} @@ -172,7 +185,7 @@ pypi_wheel_name() { # the wheel contents will be unpacked straight into ${WORKDIR}. # You need to add a BDEPEND on app-arch/unzip. # -# If is unspecified, it defaults to ${PN}. +# If is unspecified, it defaults to ${PYPI_PN}. # # If is unspecified, it defaults to ${PV} translated # via pypi_translate_version. If it is specified, then it is used @@ -197,7 +210,7 @@ pypi_wheel_url() { fi local filename=$(pypi_wheel_name "${@}") - local project=${1-"${PN}"} + local project=${1-"${PYPI_PN}"} local version=${2-"$(pypi_translate_version "${PV}")"} local pytag=${3-py3} printf "https://files.pythonhosted.org/packages/%s"; \ @@ -210,10 +223,10 @@ pypi_wheel_url() { if [[ ${PYPI_NO_NORMALIZE} ]]; then SRC_URI="$(pypi_sdist_url --no-normalize)" - S="${WORKDIR}/${PN}-$(pypi_translate_version "${PV}")" + S="${WORKDIR}/${PYPI_PN}-$(pypi_translate_version "${PV}")" else SRC_URI="$(pypi_sdist_url)" - S="${WORKDIR}/$(pypi_normalize_name "${PN}")-$(pypi_translate_version "${PV}")" + S="${WORKDIR}/$(pypi_normalize_name "${PYPI_PN}")-$(pypi_translate_version "${PV}")" fi fi diff --git a/eclass/tests/pypi.sh b/eclass/tests/pypi.sh index ebfcdb630856..471ac048b18a 100755 --- a/eclass/tests/pypi.sh +++ b/eclass/tests/pypi.sh @@ -5,7 +5,8 @@ EAPI=8 source tests-common.sh || exit -PN=Foo.Bar +PN=foo-bar +PYPI_PN=Foo.Bar PV=1.2.3_beta2 WORKDIR='' -- 2.40.0
[gentoo-dev] [PATCH 2/2] dev-python/zope-interface: Use PYPI_PN (example conversion)
Signed-off-by: Michał Górny --- dev-python/zope-interface/zope-interface-6.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-python/zope-interface/zope-interface-6.0.ebuild b/dev-python/zope-interface/zope-interface-6.0.ebuild index 71c1fab1a966..9e89f69efab2 100644 --- a/dev-python/zope-interface/zope-interface-6.0.ebuild +++ b/dev-python/zope-interface/zope-interface-6.0.ebuild @@ -4,6 +4,8 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools +PYPI_NO_NORMALIZE=1 +PYPI_PN=${PN/-/.} PYTHON_COMPAT=( python3_{9..11} pypy3 ) inherit distutils-r1 pypi @@ -13,8 +15,6 @@ HOMEPAGE=" https://github.com/zopefoundation/zope.interface/ https://pypi.org/project/zope.interface/ " -SRC_URI="$(pypi_sdist_url --no-normalize "${PN/-/.}")" -S=${WORKDIR}/${P/-/.} LICENSE="ZPL" SLOT="0" -- 2.40.0
[gentoo-dev] Last rites: net-wireless/spectools
# David Seifert (2023-03-18) # Unmaintained in Gentoo, last upstream commit 7 years ago, breaks with # modern C under Clang, no revdeps. Bug #741078, #874648, #883303. # Removal on 2023-04-17. net-wireless/spectools signature.asc Description: This is a digitally signed message part
[gentoo-dev] Last rites: sword-module.eclass
# David Seifert (2023-03-17) # @DEAD, no more revdeps # Removal on 2023-04-16. signature.asc Description: This is a digitally signed message part
[gentoo-dev] Last rites: media-plugins/vdr-remotetimers
# David Seifert (2023-03-18) # Last release over 7.5 years ago, only Gentoo still carries this, # breaks with modern C under Clang, no revdeps. # Removal on 2023-04-17. Bug #871711. media-plugins/vdr-remotetimers signature.asc Description: This is a digitally signed message part
[gentoo-dev] Last rites: sci-chemistry/prekin
# David Seifert (2023-03-18) # Upstream disappeared, release is over 14 years old, only Gentoo still # carries this, breaks with modern C under Clang, no revdeps. # Removal on 2023-04-17. Bug #862438. sci-chemistry/prekin signature.asc Description: This is a digitally signed message part
[gentoo-dev] Last rites: net-analyzer/traceroute-nanog
# David Seifert (2023-03-18) # Upstream disappeared, last release over 15 years ago, only Gentoo # still carries this, breaks with modern C under Clang, no revdeps. # Removal on 2023-04-17. Bug #875020. net-analyzer/traceroute-nanog signature.asc Description: This is a digitally signed message part
[gentoo-dev] Last rites: net-analyzer/bigeye
# David Seifert (2023-03-18) # Upstream disappeared, last release over 20 years ago, only Gentoo # still carries this, breaks with modern C under Clang, no revdeps. # Removal on 2023-04-17. Bug #875683. net-analyzer/bigeye signature.asc Description: This is a digitally signed message part
[gentoo-dev] [PATCH v2 1/3] ruby-ng.eclass: allow non-fatal use of test functions
die -n will make die become non-fatal if run under 'nonfatal', this is useful if e.g. need to do cleanup. For example, in an ebuild, I need to setup a database, run tests, then always cleanup, which looks like: ``` db_setup nonfatal each_fakegem_test || tests_failed=1 db_cleanup if [[ ${tests_failed} == 1 ]] ; then die "Tests failed! Please see ..." fi ``` Just like we do with e.g. virtualx. This also brings us into line with the Python eclasses. Signed-off-by: Sam James --- eclass/ruby-ng.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index 67c22d518a313..aa8a15170cf80 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -721,7 +721,7 @@ ruby-ng_rspec() { ;; esac - ${RUBY} -S rspec-${version} ${rspec_params} ${files} || die "rspec failed" + ${RUBY} -S rspec-${version} ${rspec_params} ${files} || die -n "rspec failed" } # @FUNCTION: ruby-ng_cucumber @@ -754,7 +754,7 @@ ruby-ng_cucumber() { ;; esac - CUCUMBER_PUBLISH_QUIET=true ${RUBY} -S cucumber ${cucumber_params} "$@" || die "cucumber failed" + CUCUMBER_PUBLISH_QUIET=true ${RUBY} -S cucumber ${cucumber_params} "$@" || die -n "cucumber failed" } # @FUNCTION: ruby-ng_testrb-2 -- 2.40.0
[gentoo-dev] [PATCH v2 2/3] ruby-ng.eclass: use eqawarn for test dependency warning
We already inherit the eqawarn eclass and use it elsewhere in this eclass, so it's available & this then fits the rest of our use. Signed-off-by: Sam James --- eclass/ruby-ng.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index aa8a15170cf80..f85a933f81d97 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -699,7 +699,7 @@ ruby-ng_rspec() { fi if [[ "${DEPEND}${BDEPEND}" != *"dev-ruby/rspec"* ]]; then - ewarn "Missing test dependency dev-ruby/rspec" + eqawarn "Missing test dependency dev-ruby/rspec" fi local rspec_params= -- 2.40.0
[gentoo-dev] [PATCH v2 3/3] ruby-fakegem.eclass: allow non-fatal use of test functions
die -n will make die become non-fatal if run under 'nonfatal', this is useful if e.g. need to do cleanup. For example, in an ebuild, I need to setup a database, run tests, then always cleanup, which looks like: ``` db_setup nonfatal each_fakegem_test || tests_failed=1 db_cleanup if [[ ${tests_failed} == 1 ]] ; then die "Tests failed! Please see ..." fi ``` Just like we do with e.g. virtualx. This also brings us into line with the Python eclasses. Signed-off-by: Sam James --- eclass/ruby-fakegem.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index 8cf5dd70f8646..9ef5e1f098d11 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-fakegem.eclass @@ -552,7 +552,7 @@ each_fakegem_test() { case ${RUBY_FAKEGEM_RECIPE_TEST} in rake) - MT_NO_PLUGINS=true ${RUBY} --disable=did_you_mean -S rake ${RUBY_FAKEGEM_TASK_TEST} || die "tests failed" + MT_NO_PLUGINS=true ${RUBY} --disable=did_you_mean -S rake ${RUBY_FAKEGEM_TASK_TEST} || die -n "tests failed" ;; rspec) RSPEC_VERSION=2 ruby-ng_rspec -- 2.40.0