!VjfUzaKsXokUdnQcvP:nixos.org

Nixpkgs Python

366 Members
Python packaging for and with Nixpkgs. | We are not involved in #dream2nix:nixos.org, mach-nix (unmaintained), #poetry2nix:nixos.org and other out-of-tree tools92 Servers

Load older messages


SenderMessageTime
27 Mar 2024
@hexa:lossy.networkhexa (PEP725 when)https://github.com/NixOS/nix/issues/1401 fwiw12:46:01
@hexa:lossy.networkhexa (PEP725 when)abusing nix-shell -p one call at a time12:46:16
@hexa:lossy.networkhexa (PEP725 when) * https://github.com/NixOS/nix/issues/1401#issuecomment-307357256 fwiw12:46:28
@gsaurel:laas.frGuilhemyes, perfect, thanks !12:46:36
Room Avatar Renderer.13:39:24
@admin:nixos.org@admin:nixos.org joined the room.13:43:19
@admin:nixos.org@admin:nixos.org left the room.13:43:27
@phaer:matrix.orgphaerPYTHONPATH 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:lossy.networkhexa (PEP725 when)🤷14:01:40
@hexa:lossy.networkhexa (PEP725 when)sounds like something that should not exist 😄 14:02:53
@hexa:lossy.networkhexa (PEP725 when) * sounds like something that should not exist in the first place 😄 14:03:02
@hexa:lossy.networkhexa (PEP725 when)not sure what I can see in our sitecustomize.py14:03:32
@hexa:lossy.networkhexa (PEP725 when) * not sure what I should see in our sitecustomize.py14:03:45
@gsaurel:laas.frGuilhem still better than sys.path.insert(0, "/whatever") just before imports ;) 14:05:56
@gsaurel:laas.frGuilhem(yes, I keep seing this everywhere 😭)14:06:12
@hexa:lossy.networkhexa (PEP725 when)indeed14:06:17
@phaer:matrix.orgphaer
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:lossy.networkhexa (PEP725 when)I suggest to nag fridh about it14:06:50
@phaer:matrix.orgphaer
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:lossy.networkhexa (PEP725 when)so NIX_PYTHONPATH handles .pth files, but PYTHONPATH does not?14:08:16
@phaer:matrix.orgphaerYes, but NIX_PYTHONPATH gets unset, so I can't use it from i.e. a shell14:08:41
@phaer:matrix.orgphaerMy 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 env14:09:33
@phaer:matrix.orgphaer
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:matrix.orgphaerAh, just found https://github.com/NixOS/nixpkgs/issues/247555 not sure how I missed that just an hour ago14:18:04
@gsaurel:laas.frGuilhem
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
@gsaurel:laas.frGuilhemI'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 there14:56:37
28 Mar 2024
@search-sense:matrix.orgsearch-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:matrix.orgsearch-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:lodere.esSebTM joined the room.03:39:18
@zmijunkie:matrix.org@zmijunkie:matrix.org left the room.09:26:07

There are no newer messages yet.


Back to Room ListRoom Version: 6