!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

332 Members
https://github.com/nix-community/poetry2nix63 Servers

Load older messages


SenderMessageTime
25 May 2022
@rolandco:matrix.orgRoland CoeurjolyI have reproduced it with nix version 2.8.010:09:47
@rolandco:matrix.orgRoland Coeurjoly I have put the override you reivilibre: mentioned, to no avail 10:10:16
@loicreynier:matrix.orgLoïc Reynier joined the room.13:04:29
@reivilibre:librepush.netreivilibre I think mysql-connector-python is to blame; its sdist (source distribution) doesn't have a setup.py in it. Even pip can't install it 13:24:32
@reivilibre:librepush.netreivilibre it's strange; when I build a sdist from their repository, it includes setup.py 13:28:37
@reivilibre:librepush.netreivilibrehttps://github.com/mysql/mysql-connector-python I don't know where they accept bug reports13:28:58
@reivilibre:librepush.netreivilibre older version do; 8.0.23 has setup.py in it — try pinning to that version 13:30:03
@reivilibre:librepush.netreivilibre8.0.23 seems to work with your example13:30:56
@reivilibre:librepush.netreivilibreI would be tempted to report it as a bug so they can fix their sdists, if you can figure out where they accept bug reports!13:31:29
@rolandco:matrix.orgRoland Coeurjoly Thanks a lot reivilibre: ! 13:38:58
@loicreynier:matrix.orgLoïc ReynierI'm trying to build a package and a environment with poetry2nix which uses pyfftw and thus requires fftw3.h to build the wheels. Here's are relevant flake.nix and pyproject files: https://gist.github.com/loicreynier/37030d30c757bf9a3b9c24665b023218 I added the FFTW packages as build inputs but wheels fail to build because fftw3.h cannot be find. Does anyone has an idea of what I am doing wrong? 13:54:20
@reivilibre:librepush.netreivilibre wonder if you need nativeBuildInputs, but that's just an idle thought 14:00:33
@reivilibre:librepush.netreivilibrehm I probably have it backwards14:01:59
@k900:0upti.meK900 You probably want to remove the manual cflags and add pkg-config to nativeBuildInputs instead 14:02:45
@reivilibre:librepush.netreivilibre I don't know but should you be passing FFTW as a build input in an override for pyfftw rather than your package? 14:03:35
@k900:0upti.meK900Also that yes14:04:08
26 May 2022
@loicreynier:matrix.orgLoïc Reynier Removing the cflags and adding pkg-config as nativeBuildInputs did not make it work 16:49:25
@loicreynier:matrix.orgLoïc Reynier I thought that the packages passed in buildInputs would be available for all packages built in the environment, so it would not be necessary to add build input for all the packages 16:51:49
@adis:blad.isadisbladis
In reply to @loicreynier:matrix.org
I thought that the packages passed in buildInputs would be available for all packages built in the environment, so it would not be necessary to add build input for all the packages
No, they will not be passed to the entire graph. You're looking for overrides.
16:53:21
@loicreynier:matrix.orgLoïc Reynier

Thanks you, it did the trick:

overrides = prev.poetry2nix.overrides.withDefaults (self: super: {
            pyfftw = super.pyfftw.overrideAttrs (
              old: {
                buildInputs = with prev; [
                  fftw
                  fftwFloat
                  fftwLongDouble
                ];
              });
17:11:29
@loicreynier:matrix.orgLoïc Reynier *

Thanks you, it did the trick:

overrides = prev.poetry2nix.overrides.withDefaults (self: super: {
  pyfftw = super.pyfftw.overrideAttrs (
    old: {
      buildInputs = with prev; [
        fftw
        fftwFloat
        fftwLongDouble
      ];
    });
  });

17:11:59
@loicreynier:matrix.orgLoïc Reynier *

Thanks you, it did the trick:

overrides = prev.poetry2nix.overrides.withDefaults (self: super: {
  pyfftw = super.pyfftw.overrideAttrs (
    old: {
      buildInputs = with prev; [
        fftw
        fftwFloat
        fftwLongDouble
      ];
    });
  });
17:12:09
@adis:blad.isadisbladisAdd it upstream in https://github.com/nix-community/poetry2nix/pull/64917:14:35
@madhadder:matrix.orgmadhadder joined the room.17:58:46
@notgne2:wizbos.clubnotgne2 joined the room.22:19:08
3 Jun 2022
@gmacon:matrix.orggmacon joined the room.19:58:51
4 Jun 2022
@schuelermine:matrix.orgschuelermine joined the room.12:31:16
@schuelermine:matrix.orgschuelermine Hi! I’ve never used Poetry before but I want to package a project that uses it. Can I use the Poetry2Nix functions directly inside Nixpkgs? I noticed that poetry build generates a dist directory and the tarball inside contains a setup.py. Should I specify the Poetry2Nix call as src? I’m unsure how this is supposed to work. 12:33:29
@adis:blad.isadisbladis
In reply to @schuelermine:matrix.org
Hi! I’ve never used Poetry before but I want to package a project that uses it. Can I use the Poetry2Nix functions directly inside Nixpkgs? I noticed that poetry build generates a dist directory and the tarball inside contains a setup.py. Should I specify the Poetry2Nix call as src? I’m unsure how this is supposed to work.
You don't use the build directory from poetry build for packaging.
13:23:04
@adis:blad.isadisbladisThat directory is used for publishing on pypi13:23:20

Show newer messages


Back to Room ListRoom Version: 6