From 87c6c6cd4f547bc022da1972a6d95b78cdea95ea Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 21 Jan 2026 17:32:24 +0100 Subject: [PATCH] python3Packages.astropy: fix OMP_NUM_THREADS going 0 --- pkgs/development/python-modules/astropy/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix index d07f43684f89..5e30833f86d1 100644 --- a/pkgs/development/python-modules/astropy/default.nix +++ b/pkgs/development/python-modules/astropy/default.nix @@ -147,6 +147,10 @@ buildPythonPackage rec { preCheck = '' export HOME="$(mktemp -d)" export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 )) + if [ $OMP_NUM_THREADS -eq 0 ]; then + export OMP_NUM_THREADS=1 + fi + # See https://github.com/astropy/astropy/issues/17649 and see # --hypothesis-profile=ci pytest flag below. cp conftest.py $out/