Merge pull request #260423 from robert-manchester/duckdb_0_9_1

duckdb: 0.9.0 -> 0.9.1
This commit is contained in:
Martin Weinelt
2023-10-21 13:03:32 +02:00
committed by GitHub
4 changed files with 46 additions and 32 deletions
@@ -15,13 +15,13 @@ let
in
stdenv.mkDerivation rec {
pname = "duckdb";
version = "0.9.0";
version = "0.9.1";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-EKvDH7RwOC4Gu/lturrfnGpzXnJ9azIwAFeuVoa6L/Y=";
hash = "sha256-UG/vV/6WxVLq9mdze8pSDFJIekOgGsg93dzMq6eP6Dg=";
};
patches = [ ./version.patch ];
@@ -106,10 +106,12 @@ stdenv.mkDerivation rec {
'';
meta = with lib; {
homepage = "https://github.com/duckdb/duckdb";
changelog = "https://github.com/duckdb/duckdb/releases/tag/v${version}";
description = "Embeddable SQL OLAP Database Management System";
homepage = "https://duckdb.org/";
license = licenses.mit;
platforms = platforms.all;
mainProgram = "duckdb";
maintainers = with maintainers; [ costrouc cpcloud ];
platforms = platforms.all;
};
}
@@ -56,25 +56,3 @@ index 2b49e11288..0a4a69b9a0 100644
message(STATUS "git hash ${GIT_COMMIT_HASH}, version ${DUCKDB_VERSION}")
diff --git a/tools/pythonpkg/setup.py b/tools/pythonpkg/setup.py
index fdf2911019..c363cc518a 100644
--- a/tools/pythonpkg/setup.py
+++ b/tools/pythonpkg/setup.py
@@ -163,8 +163,6 @@ if 'BUILD_HTTPFS' in os.environ:
for ext in extensions:
toolchain_args.extend(['-DDUCKDB_EXTENSION_{}_LINKED'.format(ext.upper())])
-toolchain_args.extend(['-DDUCKDB_EXTENSION_AUTOLOAD_DEFAULT=1', '-DDUCKDB_EXTENSION_AUTOINSTALL_DEFAULT=1'])
-
class get_pybind_include(object):
def __init__(self, user=False):
@@ -343,7 +341,7 @@ setup(
packages=packages,
include_package_data=True,
python_requires='>=3.7.0',
- setup_requires=setup_requires + ["setuptools_scm<7.0.0", 'pybind11>=2.6.0'],
+ setup_requires=setup_requires + ["setuptools_scm", 'pybind11>=2.6.0'],
use_scm_version=setuptools_scm_conf,
tests_require=['google-cloud-storage', 'mypy', 'pytest'],
classifiers=[
@@ -13,17 +13,19 @@
}:
buildPythonPackage rec {
inherit (duckdb) pname version src patches;
inherit (duckdb) pname version src;
format = "setuptools";
postPatch = ''
# 1. let nix control build cores
# 2. default to extension autoload & autoinstall disabled
# 3. unconstrain setuptools_scm version
patches = (duckdb.patches or []) ++ [ ./setup.patch ];
postPatch = (duckdb.postPatch or "") + ''
# we can't use sourceRoot otherwise patches don't apply, because the patches apply to the C++ library
cd tools/pythonpkg
# 1. let nix control build cores
# 2. unconstrain setuptools_scm version
substituteInPlace setup.py \
--replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES"
substituteInPlace setup.py --subst-var NIX_BUILD_CORES
# avoid dependency on mypy
rm tests/stubs/test_stubs.py
@@ -54,6 +56,8 @@ buildPythonPackage rec {
disabledTests = [
# tries to make http request
"test_install_non_existent_extension"
# test is racy and interrupt can be delivered before or after target point
"test_connection_interrupt"
];
preCheck = ''
@@ -0,0 +1,30 @@
diff --git a/tools/pythonpkg/setup.py b/tools/pythonpkg/setup.py
index 30f1e1ccdd..6784169fcb 100644
--- a/tools/pythonpkg/setup.py
+++ b/tools/pythonpkg/setup.py
@@ -96,7 +96,7 @@ def parallel_cpp_compile(
return
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
- list(multiprocessing.pool.ThreadPool(multiprocessing.cpu_count()).imap(_single_compile, objects))
+ list(multiprocessing.pool.ThreadPool(@NIX_BUILD_CORES@).imap(_single_compile, objects))
return objects
@@ -163,7 +163,6 @@ if 'BUILD_HTTPFS' in os.environ:
for ext in extensions:
toolchain_args.extend(['-DDUCKDB_EXTENSION_{}_LINKED'.format(ext.upper())])
-toolchain_args.extend(['-DDUCKDB_EXTENSION_AUTOLOAD_DEFAULT=1', '-DDUCKDB_EXTENSION_AUTOINSTALL_DEFAULT=1'])
class get_pybind_include(object):
@@ -348,7 +347,7 @@ setup(
packages=packages,
include_package_data=True,
python_requires='>=3.7.0',
- setup_requires=setup_requires + ["setuptools_scm<7.0.0", 'pybind11>=2.6.0'],
+ setup_requires=setup_requires + ["setuptools_scm", 'pybind11>=2.6.0'],
use_scm_version=setuptools_scm_conf,
tests_require=['google-cloud-storage', 'mypy', 'pytest'],
classifiers=[