summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Scogland <scogland1@llnl.gov>2024-05-09 11:50:42 -0700
committerGitHub <noreply@github.com>2024-05-09 11:50:42 -0700
commitb79761b7eb5eb2e2d6b8174c3043524462772bf6 (patch)
tree013e8d811b92e6005a70f3ed06a0924a6213ac9e
parent3381899c6903d8cbc01f6c8bda5d34606f890af5 (diff)
downloadspack-b79761b7eb5eb2e2d6b8174c3043524462772bf6.tar.gz
spack-b79761b7eb5eb2e2d6b8174c3043524462772bf6.tar.bz2
spack-b79761b7eb5eb2e2d6b8174c3043524462772bf6.tar.xz
spack-b79761b7eb5eb2e2d6b8174c3043524462772bf6.zip
flux-sched: set the version if the ver file is missing (#44068)
* flux-sched: set the version if the ver file is missing problem: flux-sched needs a version, it normally gets this from a release tarball or from git tags, but if using a source archive or a git clone without tags the version is missing solution: set the version through cmake based on the version spack sees when the version file is missing * Update var/spack/repos/builtin/packages/flux-sched/package.py Co-authored-by: Alec Scott <hi@alecbcs.com> --------- Co-authored-by: Alec Scott <hi@alecbcs.com>
-rw-r--r--var/spack/repos/builtin/packages/flux-sched/package.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py
index eb449cad1a..679e26ac7c 100644
--- a/var/spack/repos/builtin/packages/flux-sched/package.py
+++ b/var/spack/repos/builtin/packages/flux-sched/package.py
@@ -186,6 +186,10 @@ class FluxSched(CMakePackage, AutotoolsPackage):
class CMakeBuilder(CMakeBuilder):
def cmake_args(self):
+ ver_in_src = os.path.exists(os.path.join(self.stage.source_path, "flux-sched.ver"))
+ # flux-sched before v0.33 does not correctly set the version even when the file is present.
+ if self.spec.satisfies("@:0.33") or not ver_in_src:
+ return [self.define("FLUX_SCHED_VER", self.spec.version)]
return []