Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - pdm - Python version from d2n nixpkgs #911

Open
InLaw opened this issue Mar 26, 2024 · 1 comment
Open

WIP - pdm - Python version from d2n nixpkgs #911

InLaw opened this issue Mar 26, 2024 · 1 comment

Comments

@InLaw
Copy link
Contributor

InLaw commented Mar 26, 2024

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

@DavHau
Copy link
Member

DavHau commented Mar 27, 2024

Possibly related: #885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants