!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
22 Jan 2022
@k900:0upti.meK900Make it possible to override build-systems.json09:01:03
@k900:0upti.meK900Just to save on some typing 09:01:08
@mou_bugtracker:matrix.orgmouI could try to write first version in upcoming days, hope community will help to fix language issues, because my english is more like pidgin and have many grammar issues.09:01:12
@k900:0upti.meK900 Something like buildSystemOverrides = { aiosqlite = "flit" } 09:01:42
@adis:blad.isadisbladis
In reply to @mou_bugtracker:matrix.org
I could try to write first version in upcoming days, hope community will help to fix language issues, because my english is more like pidgin and have many grammar issues.
Don't let that stop you :) I'm happy to nit on some English spelling.
09:01:57
@k900:0upti.meK900Could potentially allow for better special case handling for weird build systems too 09:02:21
@adis:blad.isadisbladis K900: That could easily be generalised, it doesn't have to be just build systems 09:03:09
@adis:blad.isadisbladisI like the much higher level interface :)09:03:17
@k900:0upti.meK900Yeah but ideally you'd want to not have it at all 09:03:26
@k900:0upti.meK900¯\_(ツ)_/¯09:03:29
@mou_bugtracker:matrix.orgmou I agree with adisbladis . The more poetry2nix will be used the more various exception will be found. Too many attributes will be added this way. Python ecosystem has too many legacy and surprises (( K900 Maybe what you suggested could be implemented with function over overrides.withDefaults . 09:07:01
@adis:blad.isadisbladis
In reply to @k900:0upti.me
Yeah but ideally you'd want to not have it at all
We're always going to have overrides for native deps, so as long as the interface is generic I think it's a really nice addition
09:07:15
@mou_bugtracker:matrix.orgmou something like
overrides = poetry2nix.buildSystemOverrides { aiosqlite = "flit" }
09:08:23
@k900:0upti.meK900Mostly I just want to avoid it getting to a point where it's easier to add overrides than it is to fix things upstream 09:09:14
@mou_bugtracker:matrix.orgmoubut upstreams are python packages09:09:43
@mou_bugtracker:matrix.orgmoupoetry for example. It's really difficult to propose changes to product used by hundred thousands09:10:36
@mou_bugtracker:matrix.orgmouPR mentioned above in poetry is still did not accepted (09:11:24
@adis:blad.isadisbladis There is a very little documented interface that is' a lot better than withDefaults, namely poetry2nix.defaultPoetryOverrides.extend:
(poetry2nix.defaultPoetryOverrides.extend (self: super: {})).extend(self: super: {})
09:11:27
@adis:blad.isadisbladisIt actually composes nicely09:12:37
@adis:blad.isadisbladisI'm thinking that might be a decent foundation09:12:48
@adis:blad.isadisbladishttps://github.com/nix-community/poetry2nix/pull/528 phew 😓09:31:14
@adis:blad.isadisbladis(God I hate MacOS)09:31:55
@k900:0upti.meK900 adisbladis: the "not a supported wheel" thing is probably because you need 3.10 to get a bundled pip that recognizes aarch64-darwin is at all valid 09:52:12
@adis:blad.isadisbladis
In reply to @k900:0upti.me
adisbladis: the "not a supported wheel" thing is probably because you need 3.10 to get a bundled pip that recognizes aarch64-darwin is at all valid
I'm aware, I'm just not motivated enough to solve it :)
09:52:42
@adis:blad.isadisbladisAt least we have regression testing for darwin now 🤷09:55:11
@sephi:matrix.orgsephi

I’m using mkPoetryEnv for my local dev environment, but it seems I can’t use the poetry add command anymore to manipulate my pyproject.toml file:

❯ poetry add gunicorn
Using version ^20.1.0 for gunicorn

Updating dependencies
Resolving dependencies... (0.2s)

Writing lock file

Package operations: 0 installs, 31 updates, 0 removals

  • Updating asgiref (3.5.0 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 3.5.0)
  • Updating pytz (2021.3 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 2021.3)
  • Updating sqlparse (0.4.2 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 0.4.2)
  • Updating certifi (2021.10.8 /nix/store/p9z0r0817qabx2l6nfjl5lar2a836vl0-python3.9-certifi-2021.10.08/lib/python3.9/site-packages -> 2021.10.8)
  • Updating charset-normalizer (2.0.5 /nix/store/bn9zx7afgmmz8ai47l5fnkn8f2ndi5jx-python3.9-charset-normalizer-2.0.5/lib/python3.9/site-packages -> 2.0.10)
  • Updating django (3.0.14 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 3.0.14)
  • Updating idna (3.2 /nix/store/hl5mixqrm35xav0iywxcz8m7mnrzmxzl-python3.9-idna-3.2/lib/python3.9/site-packages -> 3.3)
  • Updating six (1.16.0 /nix/store/9xfvadr4vvz5988db78jy2gn3vjdwl9a-python3.9-six-1.16.0/lib/python3.9/site-packages -> 1.16.0)
  • Updating urllib3 (1.26.7 /nix/store/lrbpwbc9vnmzggc3qd2nfzipzrw00wxa-python3.9-urllib3-1.26.7/lib/python3.9/site-packages -> 1.26.8)
  • Updating webencodings (0.5.1 /nix/store/800af4vm9mi3mi2gmw2sb557aawacz2x-python3.9-webencodings-0.5.1/lib/python3.9/site-packages -> 0.5.1)
  • Updating django-taggit (1.5.1 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 1.5.1)
  • Updating django-treebeard (4.5.1 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 4.5.1)
  • Updating djangorestframework (3.13.1 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 3.13.1)
  • Updating draftjs-exporter (2.1.7 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 2.1.7)
  • Updating html5lib (1.1 /nix/store/m112dcb1rgamgyy1gnp7jfsn773ap0i1-python3.9-html5lib-1.1/lib/python3.9/site-packages -> 1.1)
  • Updating l18n (2020.6.1 -> 2021.3)
  • Updating pillow (6.2.2 /nix/store/8hy837b1jmqzpy4gcq57l80x2piidiz1-python3-3.9.6-env/lib/python3.9/site-packages -> 6.2.2): Failed

  EnvCommandError

  Command ['/home/sephi/.cache/pypoetry/virtualenvs/myproj-rnq942R3-py3.9/bin/pip', 'install', '--no-deps', '-U', 'file:///home/sephi/.cache/pypoetry/artifacts/72/23/b8/d141eebecfc4390e65c825063b71d91e2060738bede0f238b2571ad828/Pillow-6.2.2.tar.gz'] errored with the following return code 1, and output:
...
    The headers or library files could not be found for zlib,
    a required dependency when compiling Pillow from source.

Using --dry-run to get the version of the package, and then add it manually to pyproject.toml and running poetry lock works though. I’m not sure what the correct workflow is?

17:16:44
@k900:0upti.meK900Well, you're missing zlib, and poetry2nix doesn't know that you're missing zlib because Pillow is not in your lockfile because you're missing zlib17:17:44
@k900:0upti.meK900It's kind of a catch-2217:18:03
@sephi:matrix.orgsephi But poetry2nix works fine (the local dev env works correctly), it’s the poetry command invocation that doesn’t work. You mean I should just add zlib to my shell? 17:21:18
@k900:0upti.meK900 The problem isn't that poetry2nix doesn't work 17:21:53

Show newer messages


Back to Room ListRoom Version: 6