From f9b559477644ba2471b4a7a5da9777c261080a64 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 1 Jan 2022 18:43:00 +0100 Subject: [PATCH] python3Packages.duckdb: fix build --- .../python-modules/duckdb/default.nix | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix index fd360bfbd120..6e47e4eb389a 100644 --- a/pkgs/development/python-modules/duckdb/default.nix +++ b/pkgs/development/python-modules/duckdb/default.nix @@ -4,31 +4,23 @@ , numpy , pandas , pybind11 +, mypy , setuptools-scm -, pytest-runner , pytestCheckHook }: buildPythonPackage rec { pname = "duckdb"; inherit (duckdb) version src; + format = "setuptools"; - # build attempts to use git to figure out its own version. don't want to add - # the dependency for something pointless. - postPatch = '' - substituteInPlace scripts/package_build.py --replace \ - "'git'" "'false'" - ''; + sourceRoot = "source/tools/pythonpkg"; - postConfigure = '' - cd tools/pythonpkg - export SETUPTOOLS_SCM_PRETEND_VERSION=${version} - ''; + SETUPTOOLS_SCM_PRETEND_VERSION = version; nativeBuildInputs = [ pybind11 setuptools-scm - pytest-runner ]; propagatedBuildInputs = [ @@ -37,10 +29,13 @@ buildPythonPackage rec { ]; checkInputs = [ + mypy pytestCheckHook ]; - pythonImportsCheck = [ "duckdb" ]; + pythonImportsCheck = [ + "duckdb" + ]; meta = with lib; { description = "Python binding for DuckDB";