dream2nix icon indicating copy to clipboard operation
dream2nix copied to clipboard

WIP - pdm - Python version from d2n nixpkgs

Open InLaw opened this issue 1 year ago • 1 comments
trafficstars

pdm info --env

{
  "implementation_name": "cpython",
  "implementation_version": "3.11.8",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "6.1.82",
  "platform_system": "Linux",
  "platform_version": "#1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 15 18:27:50 UTC 2024",
  "python_full_version": "3.11.8",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "linux"
}

pdm recognizes python3.11

  • which is not specified but the unstable nixpkgs default

correct would be python3.12

 deps = {nixpkgs, ...}: {
    python = nixpkgs.python312Full; 
pathlib

nix log /nix/store/0r4vjjy85dd0mv0ad5md3l8d4ixrccmd-python3.12-pathlib-1.0.1.drv warning: The interpretation of store paths arguments ending in .drv recently changed. If this command is now failing try again with '/nix/store/0r4vjjy85dd0mv0ad5md3l8d4ixrccmd-python3.12-pathlib-1.0.1.drv^*' Sourcing python-remove-tests-dir-hook Sourcing python-catch-conflicts-hook.sh Sourcing python-remove-bin-bytecode-hook.sh Sourcing wheel setup hook Using wheelUnpackPhase Sourcing pypa-install-hook Using pypaInstallPhase Sourcing python-imports-check-hook.sh Using pythonImportsCheckPhase Sourcing python-namespaces-hook Sourcing python-catch-conflicts-hook.sh @nix { "action": "setPhase", "phase": "unpackPhase" } Running phase: unpackPhase Executing wheelUnpackPhase Finished executing wheelUnpackPhase @nix { "action": "setPhase", "phase": "patchPhase" } Running phase: patchPhase @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } Running phase: updateAutotoolsGnuConfigScriptsPhase @nix { "action": "setPhase", "phase": "configurePhase" } Running phase: configurePhase no configure script, doing nothing @nix { "action": "setPhase", "phase": "buildPhase" } Running phase: buildPhase no Makefile or custom buildPhase, doing nothing @nix { "action": "setPhase", "phase": "installPhase" } Running phase: installPhase Executing pypaInstallPhase Successfully installed pathlib-1.0.1-py3-none-any.whl Finished executing pypaInstallPhase @nix { "action": "setPhase", "phase": "pythonOutputDistPhase" } Running phase: pythonOutputDistPhase Executing pythonOutputDistPhase Finished executing pythonOutputDistPhase @nix { "action": "setPhase", "phase": "fixupPhase" } Running phase: fixupPhase shrinking RPATHs of ELF executables and libraries in /nix/store/7ld73wqydz6gj12xmmbs38b1j6d07b8c-python3.12-pathlib-1.0.1 checking for references to /build/ in /nix/store/7ld73wqydz6gj12xmmbs38b1j6d07b8c-python3.12-pathlib-1.0.1... patching script interpreter paths in /nix/store/7ld73wqydz6gj12xmmbs38b1j6d07b8c-python3.12-pathlib-1.0.1 shrinking RPATHs of ELF executables and libraries in /nix/store/rm29sml0bbsa6dp6yyriwp6s2jx78vaf-python3.12-pathlib-1.0.1-dist checking for references to /build/ in /nix/store/rm29sml0bbsa6dp6yyriwp6s2jx78vaf-python3.12-pathlib-1.0.1-dist... patching script interpreter paths in /nix/store/rm29sml0bbsa6dp6yyriwp6s2jx78vaf-python3.12-pathlib-1.0.1-dist Executing pythonRemoveTestsDir Finished executing pythonRemoveTestsDir Traceback (most recent call last): File "/nix/store/sqiijbqkk8ka809y7gdfy60q0fyd5c3k-auto-patchelf.py", line 13, in from pathlib import Path, PurePath File "/nix/store/7ld73wqydz6gj12xmmbs38b1j6d07b8c-python3.12-pathlib-1.0.1/lib/python3.12/site-packages/pathlib.py", line 10, in from collections import Sequence ImportError: cannot import name 'Sequence' from 'collections' (/nix/store/3v2ch16fkl50i85n05h5ckss8pxx6836-python3-3.11.8/lib/python3.11/collections/init.py) /nix/store/v099hqvw5z87423p4hz1vfhzaqa07dii-stdenv-linux/setup: line 74: pop_var_context: head of shell_variables not a function context /nix/store/v099hqvw5z87423p4hz1vfhzaqa07dii-stdenv-linux/setup: line 1475: pop_var_context: head of shell_variables not a function context /nix/store/v099hqvw5z87423p4hz1vfhzaqa07dii-stdenv-linux/setup: line 1578: pop_var_context: head of shell_variables not a function context

InLaw avatar Mar 26 '24 18:03 InLaw