summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeague Sterling <teaguesterling@users.noreply.github.com>2024-10-03 18:02:51 -0700
committerGitHub <noreply@github.com>2024-10-03 19:02:51 -0600
commit72581ded8f298f732184d046aad97d282f17d153 (patch)
tree25b9be6f8747ca5cb87c856fb3ff7741b33e961f
parent8c4ff56d9fe33f6827d5e1a916ad853f90c41eaa (diff)
downloadspack-72581ded8f298f732184d046aad97d282f17d153.tar.gz
spack-72581ded8f298f732184d046aad97d282f17d153.tar.bz2
spack-72581ded8f298f732184d046aad97d282f17d153.tar.xz
spack-72581ded8f298f732184d046aad97d282f17d153.zip
duckdb: add v1.1.1, remove 0.7.1->0.8.1, update variants (#46743)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com> Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/duckdb/package.py71
1 files changed, 45 insertions, 26 deletions
diff --git a/var/spack/repos/builtin/packages/duckdb/package.py b/var/spack/repos/builtin/packages/duckdb/package.py
index f43b3fb435..efb021ca67 100644
--- a/var/spack/repos/builtin/packages/duckdb/package.py
+++ b/var/spack/repos/builtin/packages/duckdb/package.py
@@ -18,6 +18,7 @@ class Duckdb(MakefilePackage):
maintainers("glentner", "teaguesterling")
version("master", branch="master")
+ version("1.1.1", sha256="a764cef80287ccfd8555884d8facbe962154e7c747043c0842cd07873b4d6752")
version("1.1.0", sha256="d9be2c6d3a5ebe2b3d33044fb2cb535bb0bd972a27ae38c4de5e1b4caa4bf68d")
version("1.0.0", sha256="04e472e646f5cadd0a3f877a143610674b0d2bcf9f4102203ac3c3d02f1c5f26")
version("0.10.3", sha256="7855587b3491dd488993287caee28720bee43ae28e92e8f41ea4631e9afcbf88")
@@ -42,37 +43,27 @@ class Duckdb(MakefilePackage):
sha256="3dbf3326a831bf0797591572440e81a3d6d668f8e33a25ce04efae19afc3a23d",
deprecated=True,
)
- version(
- "0.8.1",
- sha256="a0674f7e320dc7ebcf51990d7fc1c0e7f7b2c335c08f5953702b5285e6c30694",
- deprecated=True,
- )
- version(
- "0.8.0",
- sha256="df3b8e0b72bce38914f0fb1cd02235d8b616df9209beb14beb06bfbcaaf2e97f",
- deprecated=True,
- )
- version(
- "0.7.1",
- sha256="67f840f861e5ffbe137d65a8543642d016f900b89dd035492d562ad11acf0e1e",
- deprecated=True,
- )
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("python@3.7:")
- depends_on("cmake", type="build")
- depends_on("gmake", type="build")
- depends_on("ninja", when="+ninjabuild", type="build")
+ with default_args(type="build"):
+ depends_on("cmake")
+ depends_on("gmake")
+ depends_on("ninja", when="+ninjabuild")
+ depends_on("py-pip", when="+python")
+ depends_on("py-setuptools-scm", when="+python")
+ depends_on("pkgconfig", when="+static_openssl")
+ depends_on("zlib-api", when="+static_openssl")
depends_on("openssl", when="+httpfs")
depends_on("icu4c", when="~icu")
# Build Options
- variant("autocomplete", default=True, description="Include autocomplete for CLI in build")
variant("cli", default=True, description="Compile with command line client")
variant("icu", default=False, description="Compile with bundled ICU library")
variant("ninjabuild", default=True, description="Use GEN=ninja to build")
+ variant("static_openssl", default=False, description="Build with static openSSL")
variant(
"openssl",
default=False,
@@ -80,18 +71,24 @@ class Duckdb(MakefilePackage):
when="@:0.9.2",
)
+ variant("extension_autoload", default=False, description="Enable extension auto-loading")
+ variant("extension_autoinstall", default=False, description="Enable extension auto-installing")
+ variant("extension_repo", default=True, description="Copy extensions to prefix")
+
# Extensions
+ variant("autocomplete", default=True, description="Include autocomplete for CLI in build")
variant("excel", default=True, description="Include Excel formatting extension in build")
variant("fts", default=True, description="Include FTS (full text search) support in build")
variant("httpfs", default=True, description="Include HTTPFS (& S3) support in build")
variant("inet", default=True, description="Include INET (ip address) support in build")
variant("json", default=True, description="Include JSON support in build")
variant("parquet", default=True, description="Include parquent support in build")
+ variant("tpce", default=False, description="Include TPCE in build")
+ variant("tpch", default=False, description="Include TPCH in build")
# APIs
- variant("jdbc", default=False, description="Build JDBC driver (may not work)")
- variant("odbc", default=False, description="Build with ODBC driver (may not work)")
- variant("python", default=False, description="Build with Python driver (may not work)")
+ variant("python", default=True, description="Build with Python driver")
+ extends("python", when="+python")
# Observed failure in an AVX2-specific codeblock on x86_64_v4 target
conflicts(
@@ -100,9 +97,18 @@ class Duckdb(MakefilePackage):
msg="See: https://github.com/duckdb/duckdb/issues/12362",
)
+ @property
+ def duckdb_extension_prefix(self):
+ return self.prefix.lib.duckdb
+
def setup_build_environment(self, env):
+ cmake_args = [] # Future use
if self.spec.satisfies("+ninjabuild"):
env.set("GEN", "ninja")
+ if self.spec.satisfies("+python"):
+ env.set("SETUPTOOLS_SCM_PRETEND_VERSION", f"{self.spec.version}")
+ if self.spec.satisfies("+static_openssl"):
+ env.set("STATIC_OPENSSL", "1")
variant_flags = [
"autocomplete",
"cli",
@@ -111,12 +117,12 @@ class Duckdb(MakefilePackage):
"httpfs",
"icu",
"inet",
- "jdbc",
"json",
- "odbc",
- "openssl",
+ "openssl", # Deprecate after 0.9.2 retired
"parquet",
"python",
+ "tpce",
+ "tpch",
]
for flag in variant_flags:
make_flag = "BUILD_" + flag.upper()
@@ -126,6 +132,15 @@ class Duckdb(MakefilePackage):
env.set(make_flag, "0")
if self.spec.satisfies("@0.10.2:"):
env.set("OVERRIDE_GIT_DESCRIBE", f"v{self.spec.version}")
+ if self.spec.satisfies("+extension_repo"):
+ env.set("LOCAL_EXTENSION_REPO", self.prefix.lib.duckdb.extensions)
+ if self.spec.satisfies("+extension_autoload"):
+ env.set("ENABLE_EXTENSION_AUTOLOADING", "1")
+ if self.spec.satisfies("+extension_autoinstall"):
+ env.set("ENABLE_EXTENSION_AUTOINSTALL", "1")
+
+ if cmake_args:
+ env.set("EXTRA_CMAKE_VARIABLES", " ".join(cmake_args))
def url_for_version(self, version):
return "https://github.com/duckdb/duckdb/archive/refs/tags/v{0}.tar.gz".format(version)
@@ -166,6 +181,10 @@ class Duckdb(MakefilePackage):
"CMakeLists.txt",
)
+ if self.spec.satisfies("+extension_repo"):
+ mkdirp(self.prefix.lib.duckdb.extensions)
+
def install(self, spec, prefix):
mkdir(prefix.bin)
- install("build/release/duckdb", prefix.bin)
+ build_dir = join_path("build", "release")
+ install(join_path(build_dir, "duckdb"), prefix.bin)