!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

309 Members
https://github.com/nix-community/poetry2nix56 Servers

Load older messages


SenderMessageTime
6 Nov 2023
@zeratax:dmnd.shzeratax (any/all)

this works:

#pyproject.toml
[tool.poetry.scripts]
deploy_cluster_aws = "deploy_cluster_aws:main"

while this doesn't

#pyproject.toml
[tool.poetry.scripts]
deploy_cluster_aws = { reference = "deploy_cluster_aws", extras = ["aws"], type="console" }

but should be valid, no?
https://python-poetry.org/docs/pyproject/#scripts

$ nix develop
warning: Git tree '/home/jonaa/git/deployment' is dirty
error: value is a set while a string was expected

       at /nix/store/knlmp0ljafmp1k4fkf61jdhia6l9kw1q-source/shell-scripts.nix:8:31:

            7|     let
            8|       elem = builtins.elemAt (builtins.split ":" entrypoint);
             |                               ^
            9|       module = elem 0;
(use '--show-trace' to show detailed location information)
16:34:15
@k900:0upti.meK900 Probably an issue with our pyproject.toml parsing 16:35:21
@k900:0upti.meK900 CC adisbladis 16:35:25
@pareto-optimal-dev:matrix.orgpareto-optimal-dev joined the room.17:10:47
@pareto-optimal-dev:matrix.orgpareto-optimal-devI'm trying to package https://github.com/cpacker/MemGPT and running into an issue with "dist: no such file or directory" in pypaInstallPhase, specifically in the `nix/-support/setup-hook`. I think maybe I need to "passthrough" dist or modify some place to copy it? Can anyone help?17:12:59
@k900:0upti.meK900Post the full expression and log, please 17:13:34
@pareto-optimal-dev:matrix.orgpareto-optimal-devexpression: https://github.com/ParetoOptimalDev/MemGPT/blob/poetry2nix/flake.nix error: https://github.com/ParetoOptimalDev/MemGPT/blob/poetry2nix/error.log17:22:01
@k900:0upti.meK900Your build does nothing 17:22:40
@k900:0upti.meK900If it's a Rust/maturin project, you need to add the maturinBuildHook17:22:55
@matthewcroughan:defenestrate.itmatthewcroughanHahaha, I'm struggling with the same right now17:23:22
@pareto-optimal-dev:matrix.orgpareto-optimal-devEven funnier is I was about to contact you about it ;)17:24:39
@pareto-optimal-dev:matrix.orgpareto-optimal-dev
In reply to @k900:0upti.me
Your build does nothing
Well.. it fails :) But seriously I'm not sure what you mean by does nothing since I get an error. I did find the preferWheels setting though after you said that and will try that route for now before investigating rust/maturin.
17:28:12
@k900:0upti.meK900It does nothing as in it doesn't actually build the thing17:29:47
@k900:0upti.meK900And then tries to install it17:29:57
@pareto-optimal-dev:matrix.orgpareto-optimal-devOh... hence the dist directory missing17:30:31
@pareto-optimal-dev:matrix.orgpareto-optimal-dev
In reply to pareto-optimal-dev
In reply to @k900:0upti.me
Your build does nothing
Well.. it fails :) But seriously I'm not sure what you mean by does nothing since I get an error. I did find the preferWheels setting though after you said that and will try that route for now before investigating rust/maturin.
Well nix-locate returns nothing for `libmupdfcpp.so` so maybe I delve into rust/maturin instead
17:31:13
@pareto-optimal-dev:matrix.orgpareto-optimal-dev matthewcroughan - nix.how: How far are you? I'm pretty clueless on packaging python stuff? 17:41:36
@matthewcroughan:defenestrate.itmatthewcroughanit's not about python, it's about rust17:42:55
@matthewcroughan:defenestrate.itmatthewcroughanit's just such a bad situation lol17:43:49
@pareto-optimal-dev:matrix.orgpareto-optimal-dev I was just trying to understand importCargoLock if that's what you mean the difficulties are. 17:44:06
@pareto-optimal-dev:matrix.orgpareto-optimal-devIt's probably not that and there are bigger dragons past there huh?17:44:51
@matthewcroughan:defenestrate.itmatthewcroughanit's solvable, it's just annoying and required manual steps17:45:23
@matthewcroughan:defenestrate.itmatthewcroughanI've found that some of the rust stuff has cargo.locks, but poetry2nix isn't using them even when the maturin and cargo hooks are there 17:45:45
@matthewcroughan:defenestrate.itmatthewcroughanbecause that would mean IFD17:45:54
@matthewcroughan:defenestrate.itmatthewcroughan because builtins.fetchTarball isn't being used, so src refers to the tar.gz, not the outPath (narHashed output) 17:46:23
@pareto-optimal-dev:matrix.orgpareto-optimal-devHm... I guess in the short term I'll have to go back to trying to get docker to work with gpu's then it sounds like.17:47:26
@matthewcroughan:defenestrate.itmatthewcroughanNo, you just have to learn Nix, and do the hard work17:48:02
@matthewcroughan:defenestrate.itmatthewcroughanif you want it to work for a day, use docker, if you want to use it for a year, or maybe build something that will last, use nix 17:48:14
@matthewcroughan:defenestrate.itmatthewcroughanI know that's tough, but it is true in the python ecosystem 17:48:30
@pareto-optimal-dev:matrix.orgpareto-optimal-dev Yeah, it's very brittle. I've been using Nix for many years and manage my system with it. Which is why I know "you just have to learn Nix and do the hardwork" is true but in cases like this could take 100+ hours for me. 17:49:23

Show newer messages


Back to Room ListRoom Version: 6