Merge pull request #153088 from fabaff/fix-duckdb

python3Packages.duckdb: fix build
This commit is contained in:
Fabian Affolter 2022-01-02 01:34:06 +01:00 committed by GitHub
commit 2ac78e7a22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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";