diff options
author | Tom Scogland <scogland1@llnl.gov> | 2024-05-09 11:50:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-09 11:50:42 -0700 |
commit | b79761b7eb5eb2e2d6b8174c3043524462772bf6 (patch) | |
tree | 013e8d811b92e6005a70f3ed06a0924a6213ac9e | |
parent | 3381899c6903d8cbc01f6c8bda5d34606f890af5 (diff) | |
download | spack-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.py | 4 |
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 [] |