!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
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
@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

Show newer messages


Back to Room ListRoom Version: 6