!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
10 Sep 2024
@matthewcroughan:defenestrate.itmatthewcroughan changed their display name from matthewcroughan - going to nix.camp to matthewcroughan.15:53:44
@artur:glasgow.social(artur 'manuel) changed their display name from (lambda (u) (format nil "~A lost their email!" u)) "Artur Manuel" to Artur Manuel (on break).17:32:36
@artur:glasgow.social(artur 'manuel) changed their profile picture.17:34:58
@artur:glasgow.social(artur 'manuel) changed their display name from Artur Manuel (on break) to (lambda (u) (format nil "~A is not using Matrix right now." u)) "Artur Manuel".17:36:37
11 Sep 2024
@wecmyrc:matrix.orgwecmyrc joined the room.17:49:46
@wecmyrc:matrix.orgwecmyrc Hi everyone, I was trying to build a program using nix build and encountered an error: "[Errno 2] No such file or directory: 'git'". I tried adding setuptools-scm to nativeBuildInputs, but it didn't help. Has anyone run into this issue before? 17:55:28
@wecmyrc:matrix.orgwecmyrc

flake.nix:

{
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";
};
};

outputs =
inputs@{
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; };
in
{
packages = {
buzzer = poetry2nix.mkPoetryApplication {
packageName = "buzzer";
projectDir = ./.;

        overrides = poetry2nix.overrides.withDefaults (
          self: super: {
            twitch-chat-irc = super.twitch-chat-irc.overridePythonAttrs (old: {
              buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
            });
            rhvoice-wrapper = super.rhvoice-wrapper.overridePythonAttrs (old: {
              nativeBuildInputs = old.nativeBuildInputs ++ [
                self.setuptools-scm
              ];
              # buildInputs = (old.buildInputs or [ ]) ++ [
              #   super.setuptools-scm
              # ];
            });
            rhvoice-wrapper-bin = super.rhvoice-wrapper-bin.overridePythonAttrs (old: {
              nativeBuildInputs = old.nativeBuildInputs ++ [
                self.setuptools-scm
              ];
              # buildInputs = (old.buildInputs or [ ]) ++ [
              #   super.setuptools-scm
              # ];
            });
            rhvoice-wrapper-data = super.rhvoice-wrapper-data.overridePythonAttrs (old: {
              nativeBuildInputs = old.nativeBuildInputs ++ [
                self.setuptools-scm
              ];
              # buildInputs = (old.buildInputs or [ ]) ++ [
              #   super.setuptools-scm
              # ];
            });
          }
        );

        packages = with pkgs; [
          rhvoice
          vlc
        ];
      };
      default = self.packages.${system}.buzzer;
    };

    devShells.default = pkgs.mkShell {
      inputsFrom = [ self.packages.${system}.buzzer ];
      packages = with pkgs; [
        python312Packages.lxml
        scons
        poetry
        rhvoice
        vlc
      ];
    };
  }
);

}

18:15:53
@wecmyrc:matrix.orgwecmyrc *

flake.nix:

18:16:43
@wecmyrc:matrix.orgwecmyrc *

flake.nix:

18:16:50
@wecmyrc:matrix.orgwecmyrc *

flake.nix:

{
  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";
    };
  };

  outputs =
    inputs@{
      self,
      nixpkgs,
      flake-utils,
      ...
    }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
        poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; };
      in
      {
        packages = {
          buzzer = poetry2nix.mkPoetryApplication {
            packageName = "buzzer";
            projectDir = ./.;

            overrides = poetry2nix.overrides.withDefaults (
              self: super: {
                twitch-chat-irc = super.twitch-chat-irc.overridePythonAttrs (old: {
                  buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
                });
                rhvoice-wrapper = super.rhvoice-wrapper.overridePythonAttrs (old: {
                  nativeBuildInputs = old.nativeBuildInputs ++ [
                    self.setuptools-scm
                  ];
                  # buildInputs = (old.buildInputs or [ ]) ++ [
                  #   super.setuptools-scm
                  # ];
                });
                rhvoice-wrapper-bin = super.rhvoice-wrapper-bin.overridePythonAttrs (old: {
                  nativeBuildInputs = old.nativeBuildInputs ++ [
                    self.setuptools-scm
                  ];
                  # buildInputs = (old.buildInputs or [ ]) ++ [
                  #   super.setuptools-scm
                  # ];
                });
                rhvoice-wrapper-data = super.rhvoice-wrapper-data.overridePythonAttrs (old: {
                  nativeBuildInputs = old.nativeBuildInputs ++ [
                    self.setuptools-scm
                  ];
                  # buildInputs = (old.buildInputs or [ ]) ++ [
                  #   super.setuptools-scm
                  # ];
                });
              }
            );

            packages = with pkgs; [
              rhvoice
              vlc
            ];
          };
          default = self.packages.${system}.buzzer;
        };

        devShells.default = pkgs.mkShell {
          inputsFrom = [ self.packages.${system}.buzzer ];
          packages = with pkgs; [
            python312Packages.lxml
            scons
            poetry
            rhvoice
            vlc
          ];
        };
      }
    );
}

18:16:58
@wecmyrc:matrix.orgwecmyrc

pyproject.toml:

[tool.poetry]
name = "buzzer"
version = "1.0.0"
description = ""
authors = ["wecmyrc <wecmyrc@gmail.com>"]
# readme = "README.md"
license = "MIT"
packages = [
  { include = "buzzer" },
  { include = "logger" },
  { include = "db/*.py" },
]

[tool.poetry.dependencies]
python = ">=3.12,<4.0"
twitch-chat-irc = "0.0.4"
rhvoice-wrapper = "0.8.0"
# scons = "4.8.1"
lxml = "5.3.0"
rhvoice-wrapper-bin = "0.5.0"
setuptools-scm = "^8.1.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
buzzer = "buzzer.buzzer:main"


18:17:24
@wecmyrc:matrix.orgwecmyrc

error:

18:19:29
@wecmyrc:matrix.orgwecmyrc *

error:

warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/pz80y0zjjzclhn4sii6202w3n54gl720-python3.12-rhvoice-wrapper-data-0.5.0.drv^*'
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing pip-build-hook
Using pipBuildPhase
Using pipShellHook
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/n0395xiz4kyjaanlp0dvifr9c3b22d2w-rhvoice-wrapper-data-0.5.0.tar.gz
source root is rhvoice-wrapper-data-0.5.0
setting SOURCE_DATE_EPOCH to timestamp 1701031491 of file rhvoice-wrapper-data-0.5.0/setup.cfg
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
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>
Processing /build/rhvoice-wrapper-data-0.5.0
  Running command python setup.py egg_info
  ERROR! Execute ['git', 'describe', '--abbrev=0', '--tags']: [Errno 2] No such file or directory: 'git'
  WARNING! Get version from a file: 0.5.0
  running egg_info
  creating /build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info
  writing /build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/PKG-INFO
  writing dependency_links to /build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/dependency_links.txt
  writing top-level names to /build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/top_level.txt
  writing manifest file '/build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/SOURCES.txt'
  reading manifest file '/build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE.md'
  writing manifest file '/build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/SOURCES.txt'
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: rhvoice-wrapper-data
  Running command python setup.py bdist_wheel
  ERROR! Execute ['git', 'describe', '--abbrev=0', '--tags']: [Errno 2] No such file or directory: 'git'
  WARNING! Get version from a file: 0.5.0
  running bdist_wheel
  running build
  creating build
  creating build/lib
  creating build/lib/rhvoice_wrapper_data
  creating build/lib/rhvoice_wrapper_data/data
  creating build/lib/rhvoice_wrapper_data/data/voices
  creating build/lib/rhvoice_wrapper_data/data/languages
  creating build/lib/rhvoice_wrapper_data/licenses
  Clone https://github.com/RHVoice/RHVoice.git
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/build/rhvoice-wrapper-data-0.5.0/setup.py", line 167, in <module>
      setup(
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/__init__.py", line 108, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
      self.run_command(cmd)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/dist.py", line 945, in run_command
      super().run_command(command)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/dist.py", line 945, in run_command
      super().run_command(command)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/build/rhvoice-wrapper-data-0.5.0/setup.py", line 120, in run
      self.execute(executor, clone, 'Clone {}'.format(RHVOICE_URL))
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 337, in execute
      util.execute(func, args, msg, dry_run=self.dry_run)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/util.py", line 331, in execute
      func(*args)
    File "/build/rhvoice-wrapper-data-0.5.0/setup.py", line 36, in executor
      raise RuntimeError('Error executing {} in {}. {}'.format(cmd, str(cwd), err))
  RuntimeError: Error executing ['git', 'clone', '--recurse-submodules', '--depth=1', '--branch', '1.14.0', 'https://github.com/RHVoice/RHVoice.git', 'build/RHVoice'] in None. [Errno 2] No su>
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /nix/store/pgb120fb7srbh418v4i2a70aq1w9dawd-python3-3.12.5/bin/python3.12 -u -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize
  
  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)
  
  __file__ = %r
  sys.argv[0] = __file__
  
  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"
  
  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/build/rhvoice-wrapper-data-0.5.0/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /build/pip-wheel-bf9rd9_s
  cwd: /build/rhvoice-wrapper-data-0.5.0/
  Building wheel for rhvoice-wrapper-data (setup.py) ... error
  ERROR: Failed building wheel for rhvoice-wrapper-data
  Running setup.py clean for rhvoice-wrapper-data
  Running command python setup.py clean
  ERROR! Execute ['git', 'describe', '--abbrev=0', '--tags']: [Errno 2] No such file or directory: 'git'
  WARNING! Get version from a file: 0.5.0
  running clean
  removing 'build/lib' (and everything under it)
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-3.12' does not exist -- can't clean it
  removing 'build'
Failed to build rhvoice-wrapper-data
ERROR: Failed to build one or more wheels
18:20:20
@wecmyrc:matrix.orgwecmyrc *

error:

warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/pz80y0zjjzclhn4sii6202w3n54gl720-python3.12-rhvoice-wrapper-data-0.5.0.drv^*'
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing pip-build-hook
Using pipBuildPhase
Using pipShellHook
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/n0395xiz4kyjaanlp0dvifr9c3b22d2w-rhvoice-wrapper-data-0.5.0.tar.gz
source root is rhvoice-wrapper-data-0.5.0
setting SOURCE_DATE_EPOCH to timestamp 1701031491 of file rhvoice-wrapper-data-0.5.0/setup.cfg
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
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>
Processing /build/rhvoice-wrapper-data-0.5.0
  Running command python setup.py egg_info
  ERROR! Execute ['git', 'describe', '--abbrev=0', '--tags']: [Errno 2] No such file or directory: 'git'
  WARNING! Get version from a file: 0.5.0
  running egg_info
  creating /build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info
  writing /build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/PKG-INFO
  writing dependency_links to /build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/dependency_links.txt
  writing top-level names to /build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/top_level.txt
  writing manifest file '/build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/SOURCES.txt'
  reading manifest file '/build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE.md'
  writing manifest file '/build/pip-pip-egg-info-7sequpny/rhvoice_wrapper_data.egg-info/SOURCES.txt'
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: rhvoice-wrapper-data
  Running command python setup.py bdist_wheel
  ERROR! Execute ['git', 'describe', '--abbrev=0', '--tags']: [Errno 2] No such file or directory: 'git'
  WARNING! Get version from a file: 0.5.0
  running bdist_wheel
  running build
  creating build
  creating build/lib
  creating build/lib/rhvoice_wrapper_data
  creating build/lib/rhvoice_wrapper_data/data
  creating build/lib/rhvoice_wrapper_data/data/voices
  creating build/lib/rhvoice_wrapper_data/data/languages
  creating build/lib/rhvoice_wrapper_data/licenses
  Clone https://github.com/RHVoice/RHVoice.git
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/build/rhvoice-wrapper-data-0.5.0/setup.py", line 167, in <module>
      setup(
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/__init__.py", line 108, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
      self.run_command(cmd)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/dist.py", line 945, in run_command
      super().run_command(command)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/dist.py", line 945, in run_command
      super().run_command(command)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/build/rhvoice-wrapper-data-0.5.0/setup.py", line 120, in run
      self.execute(executor, clone, 'Clone {}'.format(RHVOICE_URL))
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 337, in execute
      util.execute(func, args, msg, dry_run=self.dry_run)
    File "/nix/store/llgbdr264r5ih0d19ii7k5c1ankxh9sv-python3.12-setuptools-72.1.0/lib/python3.12/site-packages/setuptools/_distutils/util.py", line 331, in execute
      func(*args)
    File "/build/rhvoice-wrapper-data-0.5.0/setup.py", line 36, in executor
      raise RuntimeError('Error executing {} in {}. {}'.format(cmd, str(cwd), err))
  RuntimeError: Error executing ['git', 'clone', '--recurse-submodules', '--depth=1', '--branch', '1.14.0', 'https://github.com/RHVoice/RHVoice.git', 'build/RHVoice'] in None. [Errno 2] No such file or directory: 'git'
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /nix/store/pgb120fb7srbh418v4i2a70aq1w9dawd-python3-3.12.5/bin/python3.12 -u -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize
  
  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)
  
  __file__ = %r
  sys.argv[0] = __file__
  
  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"
  
  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/build/rhvoice-wrapper-data-0.5.0/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /build/pip-wheel-bf9rd9_s
  cwd: /build/rhvoice-wrapper-data-0.5.0/
  Building wheel for rhvoice-wrapper-data (setup.py) ... error
  ERROR: Failed building wheel for rhvoice-wrapper-data
  Running setup.py clean for rhvoice-wrapper-data
  Running command python setup.py clean
  ERROR! Execute ['git', 'describe', '--abbrev=0', '--tags']: [Errno 2] No such file or directory: 'git'
  WARNING! Get version from a file: 0.5.0
  running clean
  removing 'build/lib' (and everything under it)
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-3.12' does not exist -- can't clean it
  removing 'build'
Failed to build rhvoice-wrapper-data
ERROR: Failed to build one or more wheels
18:21:54
@quixotic-mumble:matrix.orgNoah Sluss joined the room.22:07:07
12 Sep 2024
@artur:glasgow.social(artur 'manuel) changed their display name from (lambda (u) (format nil "~A is not using Matrix right now." u)) "Artur Manuel" to (lambda (u) (format nil "~a ~a")) "Artur" "Manuel".01:48:57
@artur:glasgow.social(artur 'manuel) changed their display name from (lambda (u) (format nil "~a ~a")) "Artur" "Manuel" to (lambda (f l) (format nil "~a ~a")) "Artur" "Manuel".01:56:00
@truh:matrix.orgtruh wecmyrc my guess would be that you need to add git to the buildInputs of RHVoice https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md 08:41:15
@truh:matrix.orgtruh Nah, the git clone in setup.py thing just won't work with nix 08:41:45
@truh:matrix.orgtruhLooks like setup.py won't try to call git clone if you give it the folder some other way.08:45:06
@truh:matrix.orgtruhScreenshot 2024-09-12 at 10.43.33.png
Download Screenshot 2024-09-12 at 10.43.33.png
08:45:15
@wecmyrc:matrix.orgwecmyrc
In reply to @truh:matrix.org
wecmyrc my guess would be that you need to add git to the buildInputs of RHVoice https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md
Thank you for the response. I think that during the build process, nix cannot use git, so I will use data obtained using fetchFromGitHub.
08:56:52
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)
In reply to @wecmyrc:matrix.org
Thank you for the response. I think that during the build process, nix cannot use git, so I will use data obtained using fetchFromGitHub.
(nix derivations can not access the network at all. Except for 'fixed output derivations', were you know exactly what they're going to produce.)
10:11:45
13 Sep 2024
@truh:matrix.orgtruhHence my second suggestion to provide the rhvoice source some other way.08:48:25
@wecmyrc:matrix.orgwecmyrc

I tried to provide RHVoice like this:

rhvoiceRepo = pkgs.fetchFromGitHub {
  owner = "RHVoice";
  repo = "RHVoice";
  rev = "8aac098edd6dac823abcfd64f2d141aea0d20bfc";
  sha256 = "sha256-1+kad+tWcmxYDlH7EAcvTGUNAY9dgnk4Kw39XqRjMtE=";
  fetchSubmodules = true;
  deepClone = true;
  leaveDotGit = true;
};

and in rhvoice-wrapped-data configurePhase pass it as link:

configurePhase = ''
  mkdir ./build
  ls -la
  ln -s ${rhvoiceRepo} ./build/RHVoice
'';

But in the end, it didn't work because I assume that setup.py, after installation, tried to delete the RHVoice source, which it didn't have permission to do. So I copied the rhvoice-wrapper-data repository, added RHVoice as a submodule, removed the git requests in setup.py, and now everything works. It's not the most elegant solution, but it's the best I've come up with for now. Thanks everyone for your help.

Here is the working repository: https://github.com/wecmyrc/rhvoice-wrapper-data-patch

Here is an example of usage:

rhvoice-wrapper-data = super.rhvoice-wrapper-data.overridePythonAttrs (old: rec {
  src = pkgs.fetchFromGitHub {
    owner = "wecmyrc";
    repo = "rhvoice-wrapper-data-patch";
    rev = "752534d8a4a99fe69540df201ce2db244c5bf77a";
    sha256 = "sha256-wpci92SxMMEI05gxcqla0sN4aS8JCa0y43WCQwmD2fw=";
    fetchSubmodules = true;
    deepClone = true;
  };
  buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools-scm ];
});
09:08:51
@wecmyrc:matrix.orgwecmyrc *

I tried to provide RHVoice like this:

rhvoiceRepo = pkgs.fetchFromGitHub {
  owner = "RHVoice";
  repo = "RHVoice";
  rev = "8aac098edd6dac823abcfd64f2d141aea0d20bfc";
  sha256 = "sha256-1+kad+tWcmxYDlH7EAcvTGUNAY9dgnk4Kw39XqRjMtE=";
  fetchSubmodules = true;
  deepClone = true;
  leaveDotGit = true;
};

and in rhvoice-wrapped-data configurePhase pass it as link:

configurePhase = ''
  mkdir ./build
  ln -s ${rhvoiceRepo} ./build/RHVoice
'';

But in the end, it didn't work because I assume that setup.py, after installation, tried to delete the RHVoice source, which it didn't have permission to do. So I copied the rhvoice-wrapper-data repository, added RHVoice as a submodule, removed the git requests in setup.py, and now everything works. It's not the most elegant solution, but it's the best I've come up with for now. Thanks everyone for your help.

Here is the working repository: https://github.com/wecmyrc/rhvoice-wrapper-data-patch

Here is an example of usage:

rhvoice-wrapper-data = super.rhvoice-wrapper-data.overridePythonAttrs (old: rec {
  src = pkgs.fetchFromGitHub {
    owner = "wecmyrc";
    repo = "rhvoice-wrapper-data-patch";
    rev = "752534d8a4a99fe69540df201ce2db244c5bf77a";
    sha256 = "sha256-wpci92SxMMEI05gxcqla0sN4aS8JCa0y43WCQwmD2fw=";
    fetchSubmodules = true;
    deepClone = true;
  };
  buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools-scm ];
});
09:20:16
16 Sep 2024
@silentlurker:matrix.orgsilentlurker joined the room.20:02:27
17 Sep 2024
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pw left the room.14:40:13
18 Sep 2024
@artur:glasgow.social(artur 'manuel) changed their profile picture.23:00:42
21 Sep 2024
@luna-null:matrix.orgAutumn joined the room.05:45:21

Show newer messages


Back to Room ListRoom Version: 6