!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
29 Apr 2024
@tcarlsdyfis:matrix.orgCharles DuffyUsing the current version of the poetry2nix flake, I see poetry2nix being built against pkginfo 1.9.6. Unfortunately, to support metadata from the latest version of hatchling, we need pkginfo 1.10.x (per https://github.com/python-poetry/poetry/issues/9244). Because these are dependencies for poetry2nix itself rather than my project, the override mechanism doesn't apply; where should I start in trying to fix this?23:29:45
30 Apr 2024
@xondtx:matrix.orgondt joined the room.22:24:09
1 May 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.15:07:27
@rolandco:matrix.orgRoland Coeurjoly
In reply to @gaivs:matrix.org

Have anyone here had success getting imgui to work with nix?

No, I got a network error. I will copy the error when I can
16:14:16
@gaivs:matrix.orggaivs
In reply to @rolandco:matrix.org
No, I got a network error. I will copy the error when I can
I ended up using dearpygui, works pretty well
16:29:05
@gsaurel:laas.frnim65sWow, there are like 50 PR which were merged or closed in the past 24h 👀 Thanks a lot for that ! ❤️21:08:36
6 May 2024
@matrixman_:matrix.orgMatt RixmanRedacted or Malformed Event02:07:32
@matrixman_:matrix.orgMatt Rixman

I'm trying to get editablePackageSources to work such that I can run pytest in a flake devshell and it will test my package, but be sensitive to local edits. Can I get some help?

I put together a repo for this request: https://github.com/MatrixManAtYrService/pytest_poetry2nix

02:48:40
@vengmark2:matrix.orgl0b0
In reply to @matrixman_:matrix.org

I'm trying to get editablePackageSources to work such that I can run pytest in a flake devshell and it will test my package, but be sensitive to local edits. Can I get some help?

I put together a repo for this request: https://github.com/MatrixManAtYrService/pytest_poetry2nix

pytest typically runs against the source code, so you shouldn't need to do anything special to achieve this. It's only if you want to run tests against the compiled application that you'd need to re-run nix develop to test against changed files.
03:53:07
@matrixman_:matrix.orgMatt Rixman
In reply to @vengmark2:matrix.org
pytest typically runs against the source code, so you shouldn't need to do anything special to achieve this. It's only if you want to run tests against the compiled application that you'd need to re-run nix develop to test against changed files.
Oh that makes sense. So instead of figuring out how to get an editable install via poetry2nix, I should be trying to figure out why the import is failing for whatever other reason.
04:15:21
@matrixman_:matrix.orgMatt Rixman
In reply to @vengmark2:matrix.org
pytest typically runs against the source code, so you shouldn't need to do anything special to achieve this. It's only if you want to run tests against the compiled application that you'd need to re-run nix develop to test against changed files.
* Oh that makes sense. So instead of figuring out how to get an editable install via poetry2nix, I should be trying to figure out why the import (test module importing app) is failing for whatever other reason.
04:16:32
@matrixman_:matrix.orgMatt Rixman *

Oh that makes sense. So instead of figuring out how to get an editable install via poetry2nix, I should be trying to figure out why the import (test module importing app) is failing for whatever other reason.

This is what I needed to hear l0b0 , thanks for the hint.

04:22:53
@nazarewk:matrix.orgnazarewkis poetry2nix using nixpkgs' package definitions or entirely it's own?12:26:56
@nazarewk:matrix.orgnazarewk * is poetry2nix using nixpkgs' package definitions or entirely it's own? I just noticed pyyaml doesn't have libyaml as a dependency 12:27:40
@julius:mtx.liftm.deˈt͡sɛːzaɐ̯By default, it gets everything from pypi. but you can override.12:33:16
@nazarewk:matrix.orgnazarewkI'm not sure why was I under impression it reused overrides from nixpkgs as a base12:34:12
@gsaurel:laas.frnim65sthere are default overrides from nixpkgs, in https://github.com/nix-community/poetry2nix/blob/master/overrides/build-systems.json & https://github.com/nix-community/poetry2nix/blob/master/overrides/default.nix13:02:08
@gsaurel:laas.frnim65sthose are here to make packages from PyPI work13:02:18
@gsaurel:laas.frnim65sI mean, packages from PyPI can have additionnal non-PyPI dependecies and/or additionnal PyPI dependecies not declared (especially build systems)13:02:59
@charles:computer.surgeryCharles changed their display name from Charles ⚡️ to Charles.17:01:08
@nazarewk:matrix.orgnazarewkany idea if it would be possible to install Ansible without the whole default galaxy collections set?17:57:37
7 May 2024
@gaivs:matrix.orggaivs

When I set editablePackageSources.myapp = ./src, this should work right? So that when I edit ./src/myapp/test.py, I thought I should be able to see that change when I run python -m myapp.test, but the same code is executed for me.

07:35:02
@kativen:matrix.orgAndrea Mangrella joined the room.19:18:03
8 May 2024
@vengmark2:matrix.orgl0b0

pyproj/_datadir.pyx:148:33: Cannot assign type 'void (void *, int, const char ) except * nogil' to 'PJ_LOG_FUNCTION' (alias of 'void ()(void *, int, const char *) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'pyproj_log_function'.
https://github.com/nix-community/poetry2nix/issues/1645

02:01:21
@vengmark2:matrix.orgl0b0 *

pyproj/_datadir.pyx:148:33: Cannot assign type 'void (void *, int, const char ) except * nogil' to 'PJ_LOG_FUNCTION' (alias of 'void ()(void *, int, const char *) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'pyproj_log_function'.

https://github.com/nix-community/poetry2nix/issues/1645

02:01:25
@vengmark2:matrix.orgl0b0 *

pyproj/_datadir.pyx:148:33: Cannot assign type 'void (void *, int, const char ) except * nogil' to 'PJ_LOG_FUNCTION' (alias of 'void ()(void *, int, const char *) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'pyproj_log_function'.

https://github.com/nix-community/poetry2nix/issues/1645

Any ideas?

02:01:37
@vengmark2:matrix.orgl0b0 *

pyproj/_datadir.pyx:148:33: Cannot assign type 'void (void *, int, const char ) except * nogil' to 'PJ_LOG_FUNCTION' (alias of 'void ()(void *, int, const char *) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'pyproj_log_function'.

https://github.com/nix-community/poetry2nix/issues/1645

Any ideas?

Update: I've created a PR with the relevant failing test.

02:13:15
@checooh:matrix.orgchecooh joined the room.11:55:19
@x10an14:matrix.orgx10an14Anyone experienced "missing attribute" error recently? Wrt. `inputs.flake-utils.lib.eachDefaultSystem`. Once I made it follow my existing `flake-utils` input I get nix complaining about line 82 in poetry2nix's `flake.nix` on current `master` (`5a62572`). 12:27:23
@x10an14:matrix.orgx10an14
In reply to @x10an14:matrix.org
Anyone experienced "missing attribute" error recently? Wrt. `inputs.flake-utils.lib.eachDefaultSystem`. Once I made it follow my existing `flake-utils` input I get nix complaining about line 82 in poetry2nix's `flake.nix` on current `master` (`5a62572`).

Here's my flake.nix, stripped of non-Nix/poetry2nix related sturr:

{
  description = "A Nix-flake for poetry based python development ";

  inputs = {
    flake-utils.url = "github:numtide/flake-utils";
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    poetry2nix = {
      url = "github:nix-community/poetry2nix";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.flake-utils.follows = "nixpkgs";
    };
  };

  outputs = {
    self,
    ...
  } @ inputs:
    inputs.flake-utils.lib.eachDefaultSystem (system: let
      pkgs = import inputs.nixpkgs {localSystem = {inherit system;};};
      inherit (inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication;
      myapp = mkPoetryApplication {projectDir = self;};
    in {
      devShells.default = pkgs.mkShell {
        inputsFrom = [myapp];
        packages = with pkgs; [
          poetry
          (
            python3.withPackages (
              exts: [
                exts.ipython
              ]
            )
          )
        ];

        shellHook = ''
          ${pkgs.python3}/bin/python3 --version
          ${pkgs.poetry}/bin/poetry --version
        '';
      };
      packages = {
        inherit myapp;
      };
      packages.default = myapp;
    });
}
12:32:31

Show newer messages


Back to Room ListRoom Version: 6