Commit a8411142 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Generate cuda package name properly if CUDA_VER is set, fall back

to, and accept, (verbatim) "cuda-X.Y" if not set
parent 64dd84aa
......@@ -19,7 +19,7 @@ import subprocess as sp
import yaml
__version__ = '0.14.5'
__version__ = '0.14.6'
"""Current version of the fsl-ci-rules."""
......
......@@ -108,7 +108,8 @@ def load_meta_yaml(filename, ignore_env=False):
if not ignore_env:
template_os.environ = os.environ.copy()
template_os.environ['CUDA_VER'] = 'CUDA_VER'
if 'CUDA_VER' not in template_os.environ:
template_os.environ['CUDA_VER'] = 'X.Y'
env = {
'os' : template_os,
......
......@@ -26,7 +26,7 @@ def get_platform(meta : dict) -> str:
('noarch' in meta['build']))
# CUDA package names end with "-cuda-X.Y"
cudapat = r'.*-cuda-\d+\.\d+'
cudapat = r'.*-cuda-(\d+\.\d+|X\.Y)'
cuda = (('package' in meta) and
('name' in meta['package']) and
re.fullmatch(cudapat, meta['package']['name']))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment