!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

325 Members
https://github.com/nix-community/poetry2nix61 Servers

Load older messages


SenderMessageTime
19 May 2022
@m1cr0man:m1cr0man.comm1cr0mansorry got sidetracked.. yep definitely missing poetry20:38:20
@m1cr0man:m1cr0man.comm1cr0manI'll set up an example in that repo20:39:26
@k900:0upti.meK900Oh it's probably my global poetry20:39:41
@k900:0upti.meK900Which I have globally20:39:44
@m1cr0man:m1cr0man.comm1cr0manok well here's an example of what I tried + the error https://github.com/m1cr0man/p2n-test/blob/main/dev-shell/build-log-python-env.log20:52:50
@m1cr0man:m1cr0man.comm1cr0manI figured there might be a way to combine envs in the greater nixpkgs lib or something20:53:15
@m1cr0man:m1cr0man.comm1cr0manthat way I could just merge this with a devShell with poetry20:53:23
@k900:0upti.meK900You can just overrideAttrs({ nativeBuildInputs = [poetry] })20:53:51
@k900:0upti.meK900 That should work 20:53:54
@m1cr0man:m1cr0man.comm1cr0man

Yep! :D

        devShell = (pkgs.poetry2nix.mkPoetryEnv {
          projectDir = ./.;
        }).env.overrideAttrs(final: prev: { nativeBuildInputs = [pkgs.poetry]; });
20:56:02
@m1cr0man:m1cr0man.comm1cr0manok class, thanks for your help20:56:18
@m1cr0man:m1cr0man.comm1cr0manI tried getting flake8-annotations to build but couldn't figure out why it's trying to load some non-existent test case: https://github.com/m1cr0man/p2n-test/blob/main/flake8-annotations/override-build-log-flake8-annotations.log and I'm working tomorrow, so gotta leave it for tonight :P 22:49:17
20 May 2022
@jeff:ocjtech.usJeff joined the room.20:42:28
21 May 2022
@reivilibre:librepush.netreivilibre joined the room.13:24:35
@reivilibre:librepush.netreivilibreRedacted or Malformed Event13:27:36
@reivilibre:librepush.netreivilibre

Hi,

I'm trying to package a project that has exceptiongroup (https://github.com/agronholm/exceptiongroup/blob/main/pyproject.toml#L2) as an indirect dependency.

exceptiongroup specifies flit-scm as its build system.
When building, I get ModuleNotFoundError: No module named 'flit_scm' (https://github.com/reivilibreOrg/wombat000/blob/master/NIX_BUILD_LOG.log#L83)

Looking around, I realise I need to somehow pass in the build system as a build input, but I'm having a hard time finding the right incantation (the obvious thing of 'like poetry but flit-scm' didn't work)

                 exceptiongroup = super.exceptiongroup.overridePythonAttrs (old: {
                   # 'No module named flit_scm' for sdist
                   # workaround https://github.com/nix-community/poetry2nix/issues/568
                   buildInputs = old.buildInputs or [ ] ++ [ self.python.pkgs.flit-scm ];
                 });

(https://github.com/reivilibreOrg/wombat000/blob/master/flake.nix#L35-L39)
That tells me attribute 'flit-scm' missing (I've tried both flit-scm and flit_scm; it seems quite inconsistent)

I have a minimal example here: https://github.com/reivilibreOrg/wombat000
I've been using nix build .#apps.x86_64-linux.wombat000 -j 8

I appreciate this is likely to be a stupid mistake, but any thoughts on what I'm missing?

13:32:06
@reivilibre:librepush.netreivilibre *

Hi,

I'm trying to package a project that has exceptiongroup (https://github.com/agronholm/exceptiongroup/blob/main/pyproject.toml#L2) as an indirect dependency.

exceptiongroup specifies flit_scm as its build system.
When building, I get ModuleNotFoundError: No module named 'flit_scm' (https://github.com/reivilibreOrg/wombat000/blob/master/NIX_BUILD_LOG.log#L83)

Looking around, I realise I need to somehow pass in the build system as a build input, but I'm having a hard time finding the right incantation (the obvious thing of 'like poetry but flit-scm' didn't work)

                 exceptiongroup = super.exceptiongroup.overridePythonAttrs (old: {
                   # 'No module named flit_scm' for sdist
                   # workaround https://github.com/nix-community/poetry2nix/issues/568
                   buildInputs = old.buildInputs or [ ] ++ [ self.python.pkgs.flit-scm ];
                 });

(https://github.com/reivilibreOrg/wombat000/blob/master/flake.nix#L35-L39)
That tells me attribute 'flit-scm' missing (I've tried both flit-scm and flit_scm; it seems quite inconsistent)

I have a minimal example here: https://github.com/reivilibreOrg/wombat000
I've been using nix build .#apps.x86_64-linux.wombat000 -j 8

I appreciate this is likely to be a stupid mistake, but any thoughts on what I'm missing?

13:36:42
@reivilibre:librepush.netreivilibre I think the problem might be that flit_scm isn't packaged in Nix; in that case, do I need to package it myself...? :o 13:41:10
@reivilibre:librepush.netreivilibre That seems a little daunting and flit_scm is a flit project, not a poetry project, so I guess poetry2nix wouldn't be much use for packaging it 13:43:18
@reivilibre:librepush.netreivilibre Another question I have is: can I prevent poetry2nix building dev-dependencies? One of them is mypy and it takes aaaages to build, when the final result doesn't even use it. 14:48:47
@m1cr0man:m1cr0man.comm1cr0man
In reply to @reivilibre:librepush.net
Another question I have is: can I prevent poetry2nix building dev-dependencies? One of them is mypy and it takes aaaages to build, when the final result doesn't even use it.
I found setting doCheck = false in mkPoetryApplication did the trick :)
23:45:07
22 May 2022
@reivilibre:librepush.netreivilibre
In reply to @m1cr0man:m1cr0man.com
I found setting doCheck = false in mkPoetryApplication did the trick :)
Thank you very much!
09:20:23
23 May 2022
@truroshan:matrix.orgroShan joined the room.04:52:07
24 May 2022
@rolandco:matrix.orgRoland CoeurjolyHi! Has anyone installed a MySQL connector? I'm trying with mysql-connector-python, which is the official one, with no luck20:33:26
@rolandco:matrix.orgRoland Coeurjolyerror: builder for ‘/nix/store/la3n52hrn7y4qrlhg40mvnp5kxb99bca-python3.9-mysql-connector-python-8.0.29.drv’ failed with exit code 1; last 10 log lines: > setting SOURCE_DATE_EPOCH to timestamp 1648112512 of file mysql-connector-python-8.0.29/mysql_connector_python-8.0.29-py3.7.egg-info/top_level.txt > patching sources > configuring > no configure script, doing nothing > building > Executing pipBuildPhase > Creating a wheel… > WARNING: The directory ’homeless-shelter.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo’s -H flag. > ERROR: Directory ‘.’ is not installable. Neither ‘setup.py’ nor ‘pyproject.toml’ found. > For full logs, run ‘nix log /nix/store/la3n52hrn7y4qrlhg40mvnp5kxb99bca-python3.9-mysql-connector-python-8.0.29.drv’. error: 1 dependencies of derivation ‘/nix/store/j8y8jgd8jfwdc42b4iswba5f0yxbknwp-python3-3.9.12-env.drv’ failed to build error: 1 dependencies of derivation ‘/nix/store/k07cz87hlawml027g3vjm2vx8cr44rnj-interactive-python3-3.9.12-environment-env.drv’ failed to build20:53:51
@rolandco:matrix.orgRoland CoeurjolyI get the previous error20:54:04
@reivilibre:librepush.netreivilibre do you have a minimal reproduction example for someone to mess around with in case any ideas come to mind? Otherwise I'd think about trying preferWheel = true; as an override for the mysql connector, but I don't know if that ever solved any of my problems so it's just grasping at straws really 22:25:09
25 May 2022
@rolandco:matrix.orgRoland Coeurjoly
In reply to @reivilibre:librepush.net
do you have a minimal reproduction example for someone to mess around with in case any ideas come to mind? Otherwise I'd think about trying preferWheel = true; as an override for the mysql connector, but I don't know if that ever solved any of my problems so it's just grasping at straws really
I have an example here https://github.com/RCoeurjoly/poetry2nix_mysql-connector-python
10:08:59
@rolandco:matrix.orgRoland CoeurjolyIt can be reproduced with nix develop10:09:16
@rolandco:matrix.orgRoland CoeurjolyI have reproduced it with nix version 2.8.010:09:47

Show newer messages


Back to Room ListRoom Version: 6