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>
This commit is contained in:
parent
3381899c69
commit
b79761b7eb
@ -186,6 +186,10 @@ def setup_run_environment(self, env):
|
|||||||
|
|
||||||
class CMakeBuilder(CMakeBuilder):
|
class CMakeBuilder(CMakeBuilder):
|
||||||
def cmake_args(self):
|
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 []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user