27 Mar 2024 |
hexa (PEP725 when) | https://github.com/NixOS/nix/issues/1401 fwiw | 12:46:01 |
hexa (PEP725 when) | abusing nix-shell -p one call at a time | 12:46:16 |
hexa (PEP725 when) | * https://github.com/NixOS/nix/issues/1401#issuecomment-307357256 fwiw | 12:46:28 |
Guilhem | yes, perfect, thanks ! | 12:46:36 |
| Room Avatar Renderer. | 13:39:24 |
| @admin:nixos.org joined the room. | 13:43:19 |
| @admin:nixos.org left the room. | 13:43:27 |
phaer | PYTHONPATH in nix does not process .pth files, while unwrapped/upstream python does.
See i.e. https://github.com/NixOS/nixpkgs/blob/8c219d1ff77956027a9bac4e502b5d2c27e39d38/pkgs/development/interpreters/python/sitecustomize.py
Is there a reason for this documented somewhere? Are there any (historical) attempts to change that?
| 14:00:14 |
hexa (PEP725 when) | 🤷 | 14:01:40 |
hexa (PEP725 when) | sounds like something that should not exist 😄 | 14:02:53 |
hexa (PEP725 when) | * sounds like something that should not exist in the first place 😄 | 14:03:02 |
hexa (PEP725 when) | not sure what I can see in our sitecustomize.py | 14:03:32 |
hexa (PEP725 when) | * not sure what I should see in our sitecustomize.py | 14:03:45 |
Guilhem | still better than sys.path.insert(0, "/whatever") just before imports ;) | 14:05:56 |
Guilhem | (yes, I keep seing this everywhere ðŸ˜) | 14:06:12 |
hexa (PEP725 when) | indeed | 14:06:17 |
phaer | In reply to @hexa:lossy.network sounds like something that should not exist in the first place 😄 Well, they do exist and are in use 😅 | 14:06:26 |
hexa (PEP725 when) | I suggest to nag fridh about it | 14:06:50 |
phaer | In reply to @hexa:lossy.network not sure what I should see in our sitecustomize.py
The module recursively adds paths that are on NIX_PYTHONPATH to sys.path . In order to process possible .pth files site.addsitedir is used.
The paths listed in PYTHONPATH are added to sys.path afterwards, but they will be added before the entries we add here and thus take precedence.
is about the only documentation i found about this. Happy to try to improve it, once I understand it myself.
| 14:07:46 |
hexa (PEP725 when) | so NIX_PYTHONPATH handles .pth files, but PYTHONPATH does not? | 14:08:16 |
phaer | Yes, but NIX_PYTHONPATH gets unset, so I can't use it from i.e. a shell | 14:08:41 |
phaer | My use-case is that I have a .pth file pointing to an editable install, and I like to add that to my python environment.
It works if i use a unwrapped python interpreter, but not with i.e. a nix python env | 14:09:33 |
phaer | In reply to @phaer:matrix.org PYTHONPATH in nix does not process .pth files, while unwrapped/upstream python does.
See i.e. https://github.com/NixOS/nixpkgs/blob/8c219d1ff77956027a9bac4e502b5d2c27e39d38/pkgs/development/interpreters/python/sitecustomize.py
Is there a reason for this documented somewhere? Are there any (historical) attempts to change that?
FRidh: Any idea/opinion on why PYTHONPATH in nix doesn't proces .pth files? Is this intentional? Hope you don't mind the mention here :) | 14:11:07 |
phaer | Ah, just found https://github.com/NixOS/nixpkgs/issues/247555 not sure how I missed that just an hour ago | 14:18:04 |
Guilhem | In reply to @search-sense:matrix.org well, it's not really about instructions how to build pymeshlab , but about errors it gives during the build, for example, that it can't find opengl It's WIP, but I have something working here : https://github.com/NixOS/nixpkgs/issues/296098 | 14:55:02 |
Guilhem | I'm not expecting a merge soon, but if someone has some spare time for review/guidance, don't hesitate, I'm certainly doing a lot of stuff wrong there | 14:56:37 |
28 Mar 2024 |
search-sense | In reply to @gsaurel:laas.fr It's WIP, but I have something working here : https://github.com/NixOS/nixpkgs/issues/296098 I somehow too was able to build package, mine working version is here https://github.com/ksenia-portu/flake/blob/master/packages/pymeshlab/default.nix unfortunately, I read your comment after writing this | 13:19:19 |
search-sense | would be anyone interested to nixify python package diff-gaussian-rasterization https://github.com/graphdeco-inria/diff-gaussian-rasterization. My attempt is here https://github.com/ksenia-portu/flake/blob/master/packages/diff-gaussian-rasterization/default.nix | 13:23:08 |
29 Mar 2024 |
| SebTM joined the room. | 03:39:18 |
| @zmijunkie:matrix.org left the room. | 09:26:07 |