Unverified Commit a7d41d4e authored by annalee's avatar annalee
Browse files

python311Packages.duckdb: fix setup.py substitutions, use scm pretend version

replacement in setup.py is now indented in an if statement so replace
with 'pass' rather than an empty string to fix parse errors

OVERRIDE_GIT_DESCRIBE broke and no longer defines the version and thus
requires SETUPTOOLS_SCM_PRETEND_VERSION
parent 6ae6cd34
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ buildPythonPackage rec {
    # 2. default to extension autoload & autoinstall disabled
    substituteInPlace setup.py \
      --replace-fail "ParallelCompile()" 'ParallelCompile("NIX_BUILD_CORES")' \
      --replace-fail "define_macros.extend([('DUCKDB_EXTENSION_AUTOLOAD_DEFAULT', '1'), ('DUCKDB_EXTENSION_AUTOINSTALL_DEFAULT', '1')])" ""
      --replace-fail "define_macros.extend([('DUCKDB_EXTENSION_AUTOLOAD_DEFAULT', '1'), ('DUCKDB_EXTENSION_AUTOINSTALL_DEFAULT', '1')])" "pass"
  '';

  env = {
@@ -34,8 +34,6 @@ buildPythonPackage rec {
    OVERRIDE_GIT_DESCRIBE="v${version}-0-g${rev}";
  };

  dontPretendSetuptoolsSCMVersion = true;

  nativeBuildInputs = [
    pybind11
    setuptools-scm