repo create: set api: vX.Y (#49344)

This commit is contained in:
Harmen Stoppels 2025-03-07 08:34:55 +01:00 committed by GitHub
parent ca977ea9e1
commit fd62f0f3a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1406,6 +1406,8 @@ def create_repo(root, namespace=None, subdir=packages_dir_name):
config.write(f" namespace: '{namespace}'\n")
if subdir != packages_dir_name:
config.write(f" subdirectory: '{subdir}'\n")
x, y = spack.package_api_version
config.write(f" api: v{x}.{y}\n")
except OSError as e:
# try to clean up.