Skip to content

Automatic extraction/requirements detection fails for dymoprint #560

@spease

Description

@spease

For some reason, even with the latest rev (8d90307), automatic everything fails with https://github.com/computerlyrik/dymoprint.

default.nix:

with (import <nixpkgs> {});

let
  mach-nix = import (builtins.fetchGit {
    url = "https://github.com/DavHau/mach-nix";
    # ref = "refs/tags/3.5.0";
    rev = "8d903072c7b5426d90bc42a008242c76590af916";
  }) {
    inherit pkgs;
    pypiDataRev = "ba35683c35218acb5258b69a9916994979dc73a9";
    pypiDataSha256 = "019m7vnykryf0lkqdfd7sgchmfffxij1vw2gvi5l15an8z3rfi2p";
  };
in
  mach-nix.buildPythonPackage {
    pname = "dymoprint";
    version = "1.4.1";
    requirements = ''
      importlib-metadata; python_version<"3.8"
      appdirs
      Pillow>=8.1.2,<10
      PyQRCode>=1.2.1,<2
      python-barcode>=0.13.1,<1
      pyusb
      PyQt6
      PyQt6-tools
    '';
    src = ./.;
  }

Note that PyQt6 and PyQt6-tools do not seem to exist, but it does not say this is the problem.

Unfortunately as part of the troubleshooting process I tried updating nix, so now I'm getting #549.

If I comment the pname,version,requirements out I get:

building '/nix/store/429nnr22lkkrs3rvwd1k158w1nsgrmag-package-requirements.drv'...
unpacking sources
unpacking source archive /nix/store/2k5xpkm5w7v71wxzs4znq29aaydvirm3-dymoprint
source root is dymoprint
installing
extracting dependencies
/nix/store/74l4x6m97bvry7ccxv51h952ayvg2j46-stdenv-linux/setup: line 1604:    18 Segmentation fault      (core dumped) out_file=$out/python.json /nix/store/xd70yp7yd8zy6c66dzbpyknvdi8fpxqx-python3-3.10.11-env-patched/bin/python -c "import sys, setuptools, tokenize, os; sys.argv[0] = 'setup.py'; __file__='setup.py';
f=getattr(tokenize, 'open', open)(__file__);
code=f.read().replace('\r\n', '\n');
f.close();
exec(compile(code, __file__, 'exec'))
" install &> $out/python.log
error:
     … while evaluating the attribute 'pkgs.buildPythonPackage'

       at /nix/store/xbvbgjphv6n2s8ggajq069cr3w23malb-nixpkgs/nixpkgs/pkgs/development/interpreters/python/passthrufun.nix:87:5:

         86|     withPackages = import ./with-packages.nix { inherit buildEnv pythonPackages;};
         87|     pkgs = pythonPackages;
           |     ^
         88|     interpreter = "${self}/bin/${executable}";

     … while calling the 'mapAttrs' builtin

       at /nix/store/xbvbgjphv6n2s8ggajq069cr3w23malb-nixpkgs/nixpkgs/pkgs/development/interpreters/python/passthrufun.nix:31:8:

         30|           value;
         31|     in lib.mapAttrs func items;
           |        ^
         32|   in ensurePythonModules (callPackage

     (stack trace truncated; use '--show-trace' to show the full trace)

     error: Automatic extraction of 'pname' from python package source /nix/store/2k5xpkm5w7v71wxzs4znq29aaydvirm3-dymoprint failed.
     Please manually specify 'pname'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions