diff options
author | Teague Sterling <teaguesterling@users.noreply.github.com> | 2024-04-29 18:51:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-29 18:51:04 -0700 |
commit | f2bd0c5cf15c2f12dd61060aef5de2ddbfe2ea99 (patch) | |
tree | 64377b62298aabb9a8748a6ab7792f1a8f6a5099 | |
parent | 436238222361777de180d1f8abe76a7f6a5cca2d (diff) | |
download | spack-f2bd0c5cf15c2f12dd61060aef5de2ddbfe2ea99.tar.gz spack-f2bd0c5cf15c2f12dd61060aef5de2ddbfe2ea99.tar.bz2 spack-f2bd0c5cf15c2f12dd61060aef5de2ddbfe2ea99.tar.xz spack-f2bd0c5cf15c2f12dd61060aef5de2ddbfe2ea99.zip |
Fix duckdb version handling again (#43762)
* Added package to build Ollama
* Update package.py
Add license and documentation
* [@spackbot] updating style on behalf of teaguesterling
* We can now use OVERRIDE_GIT_DESCRIBE to set the version in DuckDB
* Update duckdb/package.py
- use f-string
- fix version specs to address inconsistencies
* Update package.py
Fix spec definitions further
* [@spackbot] updating style on behalf of teaguesterling
---------
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/duckdb/package.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/duckdb/package.py b/var/spack/repos/builtin/packages/duckdb/package.py index 3d8d7aad69..3f2b899122 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("0.10.2", sha256="662a0ba5c35d678ab6870db8f65ffa1c72e6096ad525a35b41b275139684cea6") version("0.10.0", sha256="5a925b8607d00a97c1a3ffe6df05c0a62a4df063abd022ada82ac1e917792013") version( "0.9.2", @@ -106,6 +107,8 @@ class Duckdb(MakefilePackage): env.set(make_flag, "1") elif "~" + flag in self.spec: env.set(make_flag, "0") + if self.spec.satisfies("@0.10.2:"): + env.set("OVERRIDE_GIT_DESCRIBE", f"v{self.spec.version}") def url_for_version(self, version): return "https://github.com/duckdb/duckdb/archive/refs/tags/v{0}.tar.gz".format(version) @@ -114,9 +117,11 @@ class Duckdb(MakefilePackage): # DuckDB pulls its version from a git tag, which it can't find in the tarball # and thus defaults to something arbitrary and breaks extensions. # We use the Spack version to inject it in the right place during the build + # Patching is not needed for versions from 0.10.2 onward as we can + # set OVERRIDE_GIT_DESCRIBE to force the version when not building from a repo. version = self.spec.version - if not self.spec.satisfies("@0.10.0:"): + if self.spec.satisfies("@:0.9.2"): # Prior to version 0.10.0, this was sufficient filter_file( r'(message\(STATUS "git hash \$\{GIT_COMMIT_HASH\}, ' @@ -124,7 +129,7 @@ class Duckdb(MakefilePackage): 'set(DUCKDB_VERSION "v{0}")\n\\1'.format(version), "CMakeLists.txt", ) - else: + elif not self.spec.satisfies("@0.10.0"): # Override the fallback values that are set when GIT_COMMIT_HASH doesn't work for i, n in enumerate(["MAJOR", "MINOR", "PATCH"]): filter_file( |