[gentoo-dev] [PATCH] use.desc: Make `native-extensions` flag global

2023-11-04 Thread Michał Górny
Make the `native-extensions` flag global.  It is used in 15 Python
packages to enable building optional C extensions, though the global
description also allows for other "native" and "pure" languages.

In 9 cases, the flag description explicitly mentions "speedups", so this
is the primary case used in global description.  There is one case
of the extension providing extra features, and the remaining cases
do not explain its role.

Signed-off-by: Michał Górny 
---
 profiles/use.desc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/profiles/use.desc b/profiles/use.desc
index d8f97958e900..01915ae78918 100644
--- a/profiles/use.desc
+++ b/profiles/use.desc
@@ -212,6 +212,7 @@ musicbrainz - Lookup audio metadata using MusicBrainz 
community service (musicbr
 mysql - Add mySQL Database support
 mysqli - Add support for the improved mySQL libraries
 nas - Add support for network audio sound
+native-extensions - Build native (C, Rust) extensions in additional to pure 
(e.g. Python) code (usually speedups)
 ncurses - Add ncurses support (console display library)
 neXt - Enable neXt toolkit
 netcdf - Enable NetCDF data format support
-- 
2.42.1




[gentoo-dev] Last rites: media-plugins/gst-transcoder

2023-11-04 Thread Mart Raudsepp
# Mart Raudsepp  (2023-11-04)
# gst-transcoder was merged into gst-plugins-bad and can be installed via
# media-libs/gst-plugins-bad instead. Removal on 2023-12-04. Bug #916871.
media-plugins/gst-transcoder




[gentoo-dev] Last rites: media-libs/gnonlin

2023-11-04 Thread Mart Raudsepp
# Mart Raudsepp  (2023-11-04)
# Legacy GStreamer non-linear multimedia editing elements, superseded by
# media-libs/gstreamer-editing-services long ago.
# Removal on 2023-12-04. Bug #916870.
media-libs/gnonlin




[gentoo-dev] [PATCH 3/3] eclass/dotnet-pkg-base.eclass: remove DOTNET_DATA and NUGET_DATA

2023-11-04 Thread Maciej Barć
they do not influence .NET build

Signed-off-by: Maciej Barć 
---
 eclass/dotnet-pkg-base.eclass | 4 
 1 file changed, 4 deletions(-)

diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
index 9b070d9c2..1a9d31120 100644
--- a/eclass/dotnet-pkg-base.eclass
+++ b/eclass/dotnet-pkg-base.eclass
@@ -245,10 +245,6 @@ dotnet-pkg-base_setup() {
# and not rely upon this environment variable.
unset DOTNET_ROOT
 
-   # Unset .NET and NuGet directories.
-   unset DOTNET_DATA
-   unset NUGET_DATA
-
DOTNET_PKG_RUNTIME="$(dotnet-pkg-base_get-runtime)"
DOTNET_PKG_CONFIGURATION="$(dotnet-pkg-base_get-configuration)"
DOTNET_PKG_OUTPUT="$(dotnet-pkg-base_get-output "${P}")"
-- 
2.41.0




[gentoo-dev] [PATCH 2/3] eclass/dotnet-pkg-base.eclass: mark OUTPUT_VARIABLEs

2023-11-04 Thread Maciej Barć
Signed-off-by: Maciej Barć 
---
 eclass/dotnet-pkg-base.eclass | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
index 35beacfeb..9b070d9c2 100644
--- a/eclass/dotnet-pkg-base.eclass
+++ b/eclass/dotnet-pkg-base.eclass
@@ -44,6 +44,7 @@ inherit edo multiprocessing nuget
 # should be picked by the maintainer.
 
 # @ECLASS_VARIABLE: DOTNET_PKG_RDEPS
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Populated with important dependencies on .NET ecosystem packages for running
 # .NET packages.
@@ -52,6 +53,7 @@ inherit edo multiprocessing nuget
 DOTNET_PKG_RDEPS=""
 
 # @ECLASS_VARIABLE: DOTNET_PKG_BDEPS
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Populated with important dependencies on .NET ecosystem packages for building
 # .NET packages.
@@ -98,6 +100,7 @@ export UseSharedCompilation=false
 
 # @ECLASS_VARIABLE: DOTNET_PKG_RUNTIME
 # @DEFAULT_UNSET
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Sets the runtime used to build a package.
 #
@@ -105,6 +108,7 @@ export UseSharedCompilation=false
 
 # @ECLASS_VARIABLE: DOTNET_PKG_EXECUTABLE
 # @DEFAULT_UNSET
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Sets path of a "dotnet" executable.
 #
@@ -112,6 +116,7 @@ export UseSharedCompilation=false
 
 # @ECLASS_VARIABLE: DOTNET_PKG_CONFIGURATION
 # @DEFAULT_UNSET
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Configuration value passed to "dotnet" in the compile phase.
 # Is either Debug or Release, depending on the "debug" USE flag.
@@ -120,6 +125,7 @@ export UseSharedCompilation=false
 
 # @ECLASS_VARIABLE: DOTNET_PKG_OUTPUT
 # @DEFAULT_UNSET
+# @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # Path of the output directory, where the package artifacts are placed during
 # the building of packages with "dotnet-pkg-base_build" function.
-- 
2.41.0




[gentoo-dev] [PATCH 1/3] eclass/dotnet-pkg-base.eclass: remove DOTNET_PKG_EXECUTABLE_PATH

2023-11-04 Thread Maciej Barć
Signed-off-by: Maciej Barć 
---
 eclass/dotnet-pkg-base.eclass | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
index 5b2d6e2dd..35beacfeb 100644
--- a/eclass/dotnet-pkg-base.eclass
+++ b/eclass/dotnet-pkg-base.eclass
@@ -222,20 +222,18 @@ dotnet-pkg-base_setup() {
dotnet_compat_impl_path="$(type -P "${dotnet_compat_impl}")"
 
if [[ -n ${dotnet_compat_impl_path} ]] ; then
-   DOTNET_PKG_EXECUTABLE=${dotnet_compat_impl}
-   DOTNET_PKG_EXECUTABLE_PATH="${dotnet_compat_impl_path}"
-
+   DOTNET_PKG_EXECUTABLE="${dotnet_compat_impl}"
break
fi
done
 
# Link "DOTNET_PKG_EXECUTABLE" to "dotnet" only for the package build.
-   local dotnet_spoof_path="${T}"/dotnet_spoof/${DOTNET_PKG_COMPAT}
+   local dotnet_spoof_path="${T}/dotnet_spoof/${DOTNET_PKG_COMPAT}"
mkdir -p "${dotnet_spoof_path}" || die
-   ln -s "${DOTNET_PKG_EXECUTABLE_PATH}" "${dotnet_spoof_path}"/dotnet || 
die
+   ln -s "${dotnet_compat_impl_path}" "${dotnet_spoof_path}/dotnet" || die
export PATH="${dotnet_spoof_path}:${PATH}"
 
-   einfo "Using dotnet SDK \"${DOTNET_PKG_EXECUTABLE}\" from 
\"${DOTNET_PKG_EXECUTABLE_PATH}\"."
+   einfo "Using dotnet SDK \"${DOTNET_PKG_EXECUTABLE}\" from 
\"${dotnet_compat_impl_path}\"."
 
# The picked "DOTNET_PKG_EXECUTABLE" should set "DOTNET_ROOT" internally
# and not rely upon this environment variable.
-- 
2.41.0




[gentoo-dev] Last rites: dev-python/wstools

2023-11-04 Thread Michał Górny
# Michał Górny  (2023-11-04)
# Broken on py3.12.  Last commit in 2020.  Already a second fork
# of the package.  No revdeps.
# Removal on 2023-12-04.  Bug #916856.
dev-python/wstools

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


[gentoo-dev] Change to ada.eclass to support gcc:13

2023-11-04 Thread Alfredo Tupone
I want to add support to gcc:13 for ada packages

In attachment the new ada.eclass.

Inline are the changes applyed:

--- ada.eclass  2023-11-04 13:38:30.857702705 +0100
+++ ada.eclass.new  2023-11-03 23:16:34.643870434 +0100
@@ -57,7 +57,7 @@
 # @DESCRIPTION:
 # All supported Ada implementations, most preferred last.
 _ADA_ALL_IMPLS=(
-   gnat_2021 gcc_12
+   gnat_2021 gcc_12 gcc_13
 )
 readonly _ADA_ALL_IMPLS
 
@@ -119,10 +119,7 @@
# keep in sync with _ADA_ALL_IMPLS!
# (not using that list because inline patterns shall be faster)
case "${impl}" in
-   gnat_2021)
-   return 0
-   ;;
-   gcc_12)
+   gnat_2021|gcc_12|gcc_13)
return 0
;;
*)
@@ -216,11 +213,7 @@
local impl var
 
case "${1}" in
-   gnat_2021)
-   impl=${1}
-   shift
-   ;;
-   gcc_12)
+   gnat_2021|gcc_12|gcc_13)
impl=${1}
shift
;;
@@ -244,6 +237,10 @@
gcc_pv=12
slot=12
;;
+   gcc_13)
+   gcc_pv=13
+   slot=13
+   ;;
*)
gcc_pv="9.9.9"
slot=9.9.9
@@ -293,7 +290,7 @@
gnat_2021)

ADA_PKG_DEP="dev-lang/gnat-gpl:${slot}[ada]"
;;
-   gcc_12)
+   gcc_12|gcc_13)

ADA_PKG_DEP="sys-devel/gcc:${slot}[ada]"
;;
*)


Any comments? Can I do things better?

Alfredo


ada.eclass.new
Description: Binary data


[gentoo-dev] [PATCH 6/6] dev-python/numpy: Switch to EPYTEST_XDIST

2023-11-04 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 dev-python/numpy/numpy-1.26.1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-python/numpy/numpy-1.26.1.ebuild 
b/dev-python/numpy/numpy-1.26.1.ebuild
index 3255d05e2c00..92564017966e 100644
--- a/dev-python/numpy/numpy-1.26.1.ebuild
+++ b/dev-python/numpy/numpy-1.26.1.ebuild
@@ -46,11 +46,11 @@ BDEPEND="
' 'python*')
dev-python/charset-normalizer[${PYTHON_USEDEP}]
>=dev-python/hypothesis-5.8.0[${PYTHON_USEDEP}]
-   dev-python/pytest-xdist[${PYTHON_USEDEP}]
>=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
)
 "
 
+EPYTEST_XDIST=1
 distutils_enable_tests pytest
 
 python_prepare_all() {
@@ -143,7 +143,7 @@ python_test() {
esac
 
rm -rf numpy || die
-   epytest -n "$(makeopts_jobs)" --pyargs numpy
+   epytest --pyargs numpy
 }
 
 python_install_all() {
-- 
2.42.0




[gentoo-dev] [PATCH 5/6] dev-python/pyrate-limiter: Use EPYTEST_XDIST

2023-11-04 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild 
b/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild
index 47947453dc89..a00cb916428e 100644
--- a/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild
+++ b/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild
@@ -26,7 +26,6 @@ RDEPEND="
 BDEPEND="
test? (
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
-   dev-python/pytest-xdist[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
)
 "
@@ -37,6 +36,7 @@ EPYTEST_DESELECT=(
# Python 3.11 is slightly faster, leading to a non-critical failure here

"tests/test_concurrency.py::test_concurrency[ProcessPoolExecutor-SQLiteBucket]"
 )
+EPYTEST_XDIST=1
 
 # TODO: package sphinx-copybutton
 # distutils_enable_sphinx docs \
@@ -67,7 +67,3 @@ src_test() {
# Clean up afterwards
kill "$(<"${redis_pid}")" || die
 }
-
-python_test() {
-   epytest -n "$(makeopts_jobs)" --dist=worksteal
-}
-- 
2.42.0




[gentoo-dev] [PATCH 4/6] distutils-r1.eclass: Add pytest-xdist dep if EPYTEST_XDIST is set

2023-11-04 Thread Michał Górny
Make `distutils_enable_tests pytest` automatically add
the `dev-python/pytest-xdist` dependency if `EPYTEST_XDIST` is set.

Signed-off-by: Michał Górny 
---
 eclass/distutils-r1.eclass| 3 +++
 eclass/python-utils-r1.eclass | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 3d69911d9209..3d756eaad556 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -617,6 +617,9 @@ distutils_enable_tests() {
;;
pytest)
test_pkgs='>=dev-python/pytest-7.3.1[${PYTHON_USEDEP}]'
+   if [[ ${EPYTEST_XDIST} ]]; then
+   test_pkgs+=' 
dev-python/pytest-xdist[${PYTHON_USEDEP}]'
+   fi
;;
setup.py)
;;
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index f2a8d4d0f65e..c61f9e2ecb94 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1311,7 +1311,9 @@ _python_check_occluded_packages() {
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # If set to a non-empty value, enables running tests in parallel
-# via pytest-xdist plugin.
+# via pytest-xdist plugin.  If this variable is set prior to calling
+# distutils_enable_tests in distutils-r1, a test dependency
+# on dev-python/pytest-xdist is added automatically.
 
 # @VARIABLE: EPYTEST_JOBS
 # @USER_VARIABLE
-- 
2.42.0




[gentoo-dev] [PATCH 3/6] python-utils-r1.eclass: Add EPYTEST_XDIST for epytest

2023-11-04 Thread Michał Górny
Add an `EPYTEST_XDIST` variable that can be used to enable running
the test suite in parallel via the dev-python/pytest-xdist plugin.
This also includes user-facing `EPYTEST_JOBS` to control the job count
independently of `MAKEOPTS`.

Signed-off-by: Michał Górny 
---
 eclass/python-utils-r1.eclass | 29 +
 1 file changed, 29 insertions(+)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 4a538f9942f6..f2a8d4d0f65e 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1307,6 +1307,19 @@ _python_check_occluded_packages() {
 # parameter, when calling epytest.  The listed files will be entirely
 # skipped from test collection.
 
+# @VARIABLE: EPYTEST_XDIST
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set to a non-empty value, enables running tests in parallel
+# via pytest-xdist plugin.
+
+# @VARIABLE: EPYTEST_JOBS
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Specifies the number of jobs for parallel (pytest-xdist) test runs.
+# When unset, defaults to -j from MAKEOPTS, or the current nproc.
+
 # @FUNCTION: epytest
 # @USAGE: [...]
 # @DESCRIPTION:
@@ -1371,6 +1384,22 @@ epytest() {
-p no:plus
-p no:tavern
)
+
+   if [[ ${EPYTEST_XDIST} ]]; then
+   local jobs=${EPYTEST_JOBS:-$(makeopts_jobs)}
+   if [[ ${jobs} -gt 1 ]]; then
+   args+=(
+   # explicitly enable the plugin, in case the 
ebuild was using
+   # PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+   -p xdist
+   -n "${jobs}"
+   # worksteal ensures that workers don't end up 
idle when heavy
+   # jobs are unevenly distributed
+   --dist=worksteal
+   )
+   fi
+   fi
+
local x
for x in "${EPYTEST_DESELECT[@]}"; do
args+=( --deselect "${x}" )
-- 
2.42.0




[gentoo-dev] [PATCH 2/6] distutils-r1.eclass: Refactor d_e_t to permit multiple test packages

2023-11-04 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/distutils-r1.eclass | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 9dd091921391..3d69911d9209 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -610,13 +610,13 @@ distutils_enable_tests() {
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: 
test-runner"
 
local test_deps=${RDEPEND}
-   local test_pkg
+   local test_pkgs
case ${1} in
nose)
-   test_pkg=">=dev-python/nose-1.3.7_p20221026"
+   
test_pkgs='>=dev-python/nose-1.3.7_p20221026[${PYTHON_USEDEP}]'
;;
pytest)
-   test_pkg=">=dev-python/pytest-7.3.1"
+   test_pkgs='>=dev-python/pytest-7.3.1[${PYTHON_USEDEP}]'
;;
setup.py)
;;
@@ -635,12 +635,12 @@ distutils_enable_tests() {
_DISTUTILS_TEST_RUNNER=${1}
python_test() { distutils-r1_python_test; }
 
-   if [[ -n ${test_pkg} ]]; then
+   if [[ -n ${test_pkgs} ]]; then
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
-   test_deps+=" ${test_pkg}[${PYTHON_USEDEP}]"
+   test_deps+=" 
${test_pkgs//'${PYTHON_USEDEP}'/${PYTHON_USEDEP}}"
else
test_deps+=" $(python_gen_cond_dep "
-   ${test_pkg}[\${PYTHON_USEDEP}]
+   ${test_pkgs}
")"
fi
fi
-- 
2.42.0




[gentoo-dev] [PATCH 1/6] distutils-r1.eclass: Refactor `d_e_t unittest` (NFC)

2023-11-04 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/distutils-r1.eclass | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 1cc91110dccf..9dd091921391 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -608,6 +608,8 @@ distutils_enable_tests() {
esac
 
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: 
test-runner"
+
+   local test_deps=${RDEPEND}
local test_pkg
case ${1} in
nose)
@@ -619,7 +621,12 @@ distutils_enable_tests() {
setup.py)
;;
unittest)
-   # dep handled below
+   # unittest-or-fail is needed in py<3.12
+   test_deps+="
+   $(python_gen_cond_dep '
+   
dev-python/unittest-or-fail[${PYTHON_USEDEP}]
+   ' 3.10 3.11)
+   "
;;
*)
die "${FUNCNAME}: unsupported argument: ${1}"
@@ -628,7 +635,6 @@ distutils_enable_tests() {
_DISTUTILS_TEST_RUNNER=${1}
python_test() { distutils-r1_python_test; }
 
-   local test_deps=${RDEPEND}
if [[ -n ${test_pkg} ]]; then
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
test_deps+=" ${test_pkg}[${PYTHON_USEDEP}]"
@@ -637,13 +643,6 @@ distutils_enable_tests() {
${test_pkg}[\${PYTHON_USEDEP}]
")"
fi
-   elif [[ ${1} == unittest ]]; then
-   # unittest-or-fail is needed in py<3.12
-   test_deps+="
-   $(python_gen_cond_dep '
-   dev-python/unittest-or-fail[${PYTHON_USEDEP}]
-   ' 3.{9..11})
-   "
fi
if [[ -n ${test_deps} ]]; then
IUSE+=" test"
-- 
2.42.0




[gentoo-dev] [PATCH 0/6] python-utils-r1/distutils-r1: EPYTEST_XDIST support

2023-11-04 Thread Michał Górny
Hi,

Here's a patchset that introduces EPYTEST_XDIST=1 variable to
automatically use dev-python/pytest-xdist to run test suites in parallel
via epytest.  It also takes care of adding the dep if set prior to
distutils_enable_tests (as expected, pkgcheck will also check for that).

I'm also adding an EPYTEST_JOBS variable to allow overriding the job
count independently of MAKEOPTS.

The patches also include some prior refactoring and two example ebuild
conversions.

PR: https://github.com/gentoo/gentoo/pull/33667

-- 
Best regards,
Michał Górny

Michał Górny (6):
  distutils-r1.eclass: Refactor `d_e_t unittest` (NFC)
  distutils-r1.eclass: Refactor d_e_t to permit multiple test packages
  python-utils-r1.eclass: Add EPYTEST_XDIST for epytest
  distutils-r1.eclass: Add pytest-xdist dep if EPYTEST_XDIST is set
  dev-python/pyrate-limiter: Use EPYTEST_XDIST
  dev-python/numpy: Switch to EPYTEST_XDIST

 dev-python/numpy/numpy-1.26.1.ebuild  |  4 +--
 .../pyrate-limiter-3.1.0.ebuild   |  6 +---
 eclass/distutils-r1.eclass| 32 ++-
 eclass/python-utils-r1.eclass | 31 ++
 4 files changed, 51 insertions(+), 22 deletions(-)

-- 
2.42.0