Change:
Steps to reproduce the behavior: python312Packages.scalene Per , this failure is intentional due to some behaviour changes in setuptools. I'm not completely familiar with the change or setuptools overall, but the gist seems to be that setuptools now "prefers installed dependencies over vendored ones", whatever that means in this case. fails on () Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
EDIT: Filed a PR to fix this in Scalene.
As soon as Emery has a fix on his end, we can bump the version number or apply the patch. Edit: Watch this PR
Updated in the original sources. We need Emery to cut a new release of Scalene as we're building from the published binary. (The scalene source build is complicated.)
FYI, I managed to make source builds work. That will make future bug responses quicker.

Discussion:
<ins> From 4e25ccee2f1eeed1dfdd9356b4fde511a48d9f01 Mon Sep 17 00:00:00 2001 From: Sarah Clark <seclark@nextquestion.net> Date: Sat, 24 Aug 2024 11:32:38 -0700 Subject: [PATCH] Update MANIFEST.in to remove .git references --- MANIFEST.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 5ebcb7781..7340b1982 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ graft vendor/Heap-Layers -prune vendor/Heap-Layers/.git +# prune vendor/Heap-Layers/.git graft vendor/printf -prune vendor/printf/.git +# prune vendor/printf/.git exclude scalene/old/* -- </ins>

<ins> From 777be9c46c4caed5f3fcde65b70ada4d773f4298 Mon Sep 17 00:00:00 2001 From: Sarah Clark <seclark@nextquestion.net> Date: Sat, 24 Aug 2024 11:26:30 -0700 Subject: [PATCH] Unpin setuptools --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d17d12dc8..6bf1c7a38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ scalene = "scalene.__main__:main" [build-system] build-backend = "setuptools.build_meta" requires = [ -    "setuptools>=65.5.1,<71.0", # Pin to setuptools<71.0 to avoid this bug: https://github.com/pypa/setuptools/issues/4496 +    "setuptools>=65.5.1", "setuptools_scm>=8", "wheel", "cython", -- </ins>

lib, stdenv, buildPythonPackage, <del> hypothesis, fetchPypi, setuptools, setuptools-scm, </del> <ins> fetchFromGitHub, </ins> cloudpickle, cython, <ins> hypothesis, </ins> jinja2, numpy, <ins> nvidia-ml-py, </ins> psutil, pynvml, <del> nvidia-ml-py, </del> pytestCheckHook, pythonOlder, rich, <ins> setuptools-scm, setuptools, </ins> }: <ins> let heap-layers-src = fetchFromGitHub { owner = "emeryberger"; repo = "heap-layers"; name = "Heap-Layers"; rev = "a2048eae91b531dc5d72be7a194e0b333c06bd4c"; sha256 = "sha256-vl3z30CBX7hav/DM/UE0EQ9lLxZF48tMJrYMXuSulyA="; }; printf-src = fetchFromGitHub { owner = "mpaland"; repo = "printf"; name = "printf"; rev = "v4.0.0"; sha256 = "sha256-tgLJNJw/dJGQMwCmfkWNBvHB76xZVyyfVVplq7aSJnI="; }; in </ins> buildPythonPackage rec { pname = "scalene"; <del> version = "1.5.43.2"; </del> <ins> version = "1.5.44.1"; </ins> pyproject = true; disabled = pythonOlder "3.9"; <del> src = fetchPypi { inherit pname version; hash = "sha256-LtD7v3pLz4UCnh6xlhkPdcEjyu3mt+YQPYZ0nNCLuDw="; </del> <ins> src = fetchFromGitHub { owner = "plasma-umass"; repo = "scalene"; rev = "v${version}"; hash = "sha256-XMz+gwiNaKiKplD4kOE1yhcg+dkzjEdDYjW0JsDEMQE="; </ins> }; <ins> patches = [ ./01-manifest-no-git.patch ./02-pyproject-unpin-setuptools.patch ]; prePatch = '' cp -r ${heap-layers-src} vendor/Heap-Layers mkdir vendor/printf cp ${printf-src}/printf.c vendor/printf/printf.cpp cp -r ${printf-src}/* vendor/printf sed -i"" 's/^#define printf printf_///&/' vendor/printf/printf.h sed -i"" 's/^#define vsnprintf vsnprintf_///&/' vendor/printf/printf.h ''; </ins> nativeBuildInputs = [ cython setuptools

propagatedBuildInputs = [ cloudpickle jinja2 <ins> numpy </ins> psutil <del> rich </del> pynvml <ins> rich </ins> ] ++ lib.optionals stdenv.hostPlatform.isLinux [ nvidia-ml-py ]; pythonRemoveDeps = [

numpy ]; <ins> disabledTests = [ # Flaky -- socket collision "test_show_browser" ]; </ins> # remove scalene directory to prevent pytest import confusion preCheck = '' rm -rf scalene