27 Aug 2024 |
Artur Manuel | * Something I noted is that it works completely fine in base poetry and that this is probably an issue in how I declared the package. | 05:59:44 |
28 Aug 2024 |
Artur Manuel | Download pyproject.toml | 15:58:56 |
Artur Manuel | Download package.nix | 15:58:56 |
Artur Manuel | Download flake.nix | 15:58:57 |
Artur Manuel | https://pb.atl.tools/?aeff4a0ddca6e459#3sMAitzNr9ssws16XRKDsmBzRhnDo6fConJrXUbx8EAH | 17:07:14 |
Artur Manuel | complete error log | 17:07:18 |
29 Aug 2024 |
| moved to @amadaluzia:tchncs.de joined the room. | 05:44:39 |
30 Aug 2024 |
| moved to @amadaluzia:tchncs.de changed their display name from Artur Manuel (old email was lost, migrating) to (lambda (u) (format nil "~A lost their email!" u)) "Artur Manuel". | 03:53:34 |
Charles Duffy | ...well, this is a fun one: changing python = pkgs.python312; to python = pkgs.enableDebugging pkgs.python312; results in a pythonEnv without any libraries installed. | 18:15:43 |
2 Sep 2024 |
Silvio | Hey, I'm trying to build ansible with poetry2nix, but it fails because pynacl wants sphinxcontrib.applehelp but doesn't find it. | 16:32:38 |
Silvio | In reply to @nazarewk:matrix.org actually seems like it's env -> pynacl -> sphinx-hook ... gotta dig more into it Apparrently I'm not the first one having problems with ansible -> pynacl -> sphinx, but I have no clue how to fix it right now. | 16:32:45 |
Silvio | I was able to add some overrides for other packages, but this one I can't figure out. | 16:33:01 |
nazarewk | I can try to find my solution if you need it | 16:33:22 |
Silvio | That'd be greatly appreciated! | 16:33:41 |
nazarewk | * I can try to find my solution if you need it, I think I figured out how to completely skip sphinx and some other packages from building | 16:33:44 |
nazarewk | In reply to @silvio:booq.org Apparrently I'm not the first one having problems with ansible -> pynacl -> sphinx, but I have no clue how to fix it right now. this seems to be it:
overrides = poetry2nix.overrides.withDefaults (final: prev: let
rm.lists = lists: old: builtins.mapAttrs (name: value: lib.subtractLists value old."${name}") lists;
modified = pkg: fns: pkg.overridePythonAttrs (oldAttrs: lib.pipe oldAttrs (builtins.map (fn: entry: entry // (fn entry)) fns));
in
builtins.mapAttrs (name: modified prev."${name}") {
pynacl = [
(rm.lists {nativeBuildInputs = with final; [sphinxHook];})
(rm.lists {outputs = ["doc"];})
];
pyjwt = [
(rm.lists {nativeBuildInputs = with final; [sphinxHook sphinx-rtd-theme];})
(rm.lists {outputs = ["doc"];})
];
});
| 16:34:59 |
nazarewk | In reply to @silvio:booq.org Apparrently I'm not the first one having problems with ansible -> pynacl -> sphinx, but I have no clue how to fix it right now. * this seems to be it:
overrides = poetry2nix.overrides.withDefaults (final: prev: let
rm.lists = lists: old: builtins.mapAttrs (name: value: lib.subtractLists value old."${name}") lists;
modified = pkg: fns: pkg.overridePythonAttrs (oldAttrs: lib.pipe oldAttrs (builtins.map (fn: entry: entry // (fn entry)) fns));
in
builtins.mapAttrs (name: modified prev."${name}") {
pynacl = [
(rm.lists {nativeBuildInputs = with final; [sphinxHook];})
(rm.lists {outputs = ["doc"];})
];
pyjwt = [
(rm.lists {nativeBuildInputs = with final; [sphinxHook sphinx-rtd-theme];})
(rm.lists {outputs = ["doc"];})
];
});
basically I'm dropping doc output and a single nativeBuildInputs entry from both pyjwt and pynacl packages
| 16:38:37 |
Silvio | Omg it worked! Thank you so much 🙏 | 16:39:38 |
3 Sep 2024 |
l0b0 | Is there some way to set python when importing poetry2nix, rather than when running mkPoetryPackages and the like? | 01:35:23 |
adisbladis | Why is that important? It shouldn't matter. | 01:36:17 |
l0b0 | {pkgs}:
let
poetry2nix = import (
builtins.fetchTarball {
name = "poetry2nix-2024.8.2346599";
url = "https://github.com/nix-community/poetry2nix/archive/7619e43c2b48c29e24b88a415256f09df96ec276.tar.gz";
sha256 = "10nf9213h7vkzrqhrgk88r5sd2rq19cvdpnn59f65ifak790sgc0";
}
) {
inherit pkgs;
};
in
poetry2nix.overrideScope (finalPoetry2nix: prevPoetry2nix: {
defaultPoetryOverrides = prevPoetry2nix.defaultPoetryOverrides.extend (final: prev: {
gdal = prev.gdal.overridePythonAttrs (oldAttrs: {
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [final.numpy];
});
});
})
results in "error: value is null while a set was expected"
| 01:36:36 |
l0b0 | I thought this might be because the poetry2nix in this file doesn't know which version of Python I want to run with yet. | 01:37:06 |
adisbladis | No. That's dynamically handled in the overlay composition | 01:38:21 |
adisbladis | How can I reproduce your issue? | 01:38:56 |
l0b0 | Gotta go, but I should be able to show you soon. | 01:39:21 |
l0b0 | In reply to @adis:blad.is How can I reproduce your issue? direnv allow in https://github.com/linz/emergency-management-tools/pull/375 should do it. | 03:18:35 |
l0b0 | Yep, it's definitely something to do with the wrong Python version - I see mention of Python 3.12 in pre-commit output, and both mypy and pylint complain about missing libraries which are installed in the poetry2nix package set. | 03:33:17 |
l0b0 | * Yep, it's definitely something to do with the wrong Python version - I see mention of Python 3.12 in pre-commit output, and both mypy and pylint complain about missing libraries which are installed in the poetry2nix package set. Also:
❯ type -a python
python is /nix/store/d6cy7nfpwjppghqg3mav9537ypl6ww82-python3-3.11.9-env/bin/python
python is /nix/store/pgb120fb7srbh418v4i2a70aq1w9dawd-python3-3.12.5/bin/python
| 03:34:05 |
| @gracicot-59e8f173d73408ce4f7ac803:gitter.im left the room. | 16:13:56 |
| rpop0 joined the room. | 22:30:35 |