!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

330 Members
https://github.com/nix-community/poetry2nix62 Servers

Load older messages


SenderMessageTime
17 Apr 2022
@lovesegfault:beme.ems.hostlovesegfault changed their profile picture.01:49:00
19 Apr 2022
@jairo:recallstack.icuJairo Llopis I just opened https://github.com/nix-community/poetry2nix/pull/600 and I'm wondering: why do we even need to do this? Couldn't poetry2nix just read build-system from the pyproject.toml and extract requirements from there? 🤔 11:53:50
@adis:blad.isadisbladis
In reply to @jairo:recallstack.icu
I just opened https://github.com/nix-community/poetry2nix/pull/600 and I'm wondering: why do we even need to do this? Couldn't poetry2nix just read build-system from the pyproject.toml and extract requirements from there? 🤔
It doesn't contain that information...
11:55:32
@jairo:recallstack.icuJairo LlopisI see it there: https://github.com/platformdirs/platformdirs/blob/60fc40c294d90f7687f779487b8c19679fb73255/pyproject.toml#L311:55:57
@adis:blad.isadisbladisYeah but it doesn't end up in your projects poetry.lock11:56:29
@adis:blad.isadisbladisAnd reading the pyproject.toml from a dependency would be IFD11:57:47
@jairo:recallstack.icuJairo Llopiswhat's ifd?11:58:15
@jairo:recallstack.icuJairo LlopisIf I download the .tar.gz file from https://pypi.org/project/platformdirs/#files and open it, I can read the pyproject.toml from there indeed. That file is hashed in poetry.lock11:59:00
@k900:0upti.meK900Import from derivation11:59:00
@jairo:recallstack.icuJairo LlopisI don't know that concept, what's the problem with it?11:59:57
@adis:blad.isadisbladishttps://nixos.wiki/wiki/Import_From_Derivation12:00:11
@jairo:recallstack.icuJairo Llopisso AFAICS it slows down code evaluation12:11:31
@jairo:recallstack.icuJairo Llopisis that really worse than maintaining manual overrides for all possible packages in pypi? 🤔12:12:10
@adis:blad.isadisbladisIt's not just about that, even though that issue is also worse than you'd think since the evaluator would have to pause and realise sources for every single dependency which is a single threaded operation. But also it's about how IFD interacts terribly in regards to GC.12:42:28
@adis:blad.isadisbladisThe list of problems with IFD is long12:42:33
@adis:blad.isadisbladisAlso IFD is explicitly not allowed in nixpkgs which would make poetry2nix a non-starter for anything in nixpkgs12:42:52
@adis:blad.isadisbladisThe correct fix here is to fix upstream Poetry to properly record these dependencies in it's lock file12:43:18
20 Apr 2022
@jairo:recallstack.icuJairo Llopis
In reply to @adis:blad.is
The correct fix here is to fix upstream Poetry to properly record these dependencies in it's lock file
Thanks for the insight about this subject, indeed this fix would be the best. Has there been any movement upstream about it?
08:17:35
@adis:blad.isadisbladis
In reply to @jairo:recallstack.icu
Thanks for the insight about this subject, indeed this fix would be the best. Has there been any movement upstream about it?
https://github.com/python-poetry/poetry/pull/2794
08:21:51
@adis:blad.isadisbladisBut as of recently, no movement08:21:56
@adis:blad.isadisbladis I think we in Nix are one of very few users to actually bootstrap Python environments in a sandbox 08:25:44
@adis:blad.isadisbladisWhich is why almost no one runs into issues with this behaviour except us08:26:02
@jairo:recallstack.icuJairo Llopismost likely yes09:06:03
@FRidh:matrix.orgFRidh
In reply to @adis:blad.is
I think we in Nix are one of very few users to actually bootstrap Python environments in a sandbox
Maybe I misunderstood, but actually with pep 517/518 builds it is recommended also that front-ends create sandboxes. pip does this as well nowadays (though it's not very strict), and tools are specified in pyproject.toml. I'm surprised this isn't in the poetry lock files yet.
17:11:28
@ahsmha:matrix.orgrh joined the room.23:31:43
29 Apr 2022
@nazarewk:matrix.orgnazarewk joined the room.08:38:37
@nazarewk:matrix.orgnazarewkAny idea how do i install multiple poetry2nix apps (with executable scripts) into a single shell?08:39:30
@nazarewk:matrix.orgnazarewk * Any idea how do i install multiple poetry2nix apps (with executable scripts) in editable mode into a single shell?08:39:40
@nazarewk:matrix.orgnazarewk seems like mkPoetryEditablePackage does not add executables 08:39:53
@nazarewk:matrix.orgnazarewk I did use mkPoetryEnv with editablePackageSources, but the sources of my package still reside in /nix/store instead of current directory? 13:35:49

Show newer messages


Back to Room ListRoom Version: 6