Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building APX binaries #818

Merged
merged 1 commit into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions autospec/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def __init__(self, download_path):
self.extra_configure64 = ""
self.extra_configure_avx2 = ""
self.extra_configure_avx512 = ""
self.extra_configure_apx = ""
self.extra_configure_openmpi = ""
self.config_files = set()
self.parallel_build = " %{?_smp_mflags} "
Expand Down Expand Up @@ -413,10 +414,7 @@ def rewrite_config_opts(self):
# (in case of a user-created options.conf)
missing = set(self.config_options.keys()).difference(set(self.config_opts.keys()))
for option in missing:
if option in ['use_apx']:
self.config_opts[option] = True
else:
self.config_opts[option] = False
self.config_opts[option] = False

for fname, comment in sorted(self.config_options.items()):
config_f.set('autospec', '# {}'.format(comment))
Expand Down Expand Up @@ -913,6 +911,9 @@ def parse_config_files(self, bump, filemanager, version, requirements):
content = self.read_conf_file(os.path.join(self.download_path, "configure_avx512"))
self.extra_configure_avx512 = " \\\n".join(content)

content = self.read_conf_file(os.path.join(self.download_path, "configure_apx"))
self.extra_configure_apx = " \\\n".join(content)

content = self.read_conf_file(os.path.join(self.download_path, "configure_openmpi"))
self.extra_configure_openmpi = " \\\n".join(content)

Expand Down
10 changes: 5 additions & 5 deletions autospec/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def banned_path(path):
r"/usr/src.*",
r"/var.*"]
for bpath in banned_paths:
if re.search(r"^(/V3|/V4)?" + bpath, path):
if re.search(r"^(/V3|/V4|/VA)?" + bpath, path):
return True
return False

Expand Down Expand Up @@ -101,7 +101,7 @@ def compat_exclude(self, filename):

exclude = True
for pat in patterns:
pat = re.compile(r"^(/V3|/V4)?" + pat)
pat = re.compile(r"^(/V3|/V4|/VA)?" + pat)
if pat.search(filename):
exclude = False
break
Expand All @@ -126,10 +126,10 @@ def file_pat_match(self, filename, pattern, package, replacement=""):
# All patterns at this time and should always be prefixed by '^'
# but just in case add the following to strip just the '^'
pattern = pattern if not pattern.startswith('^') else pattern[1:]
pat = re.compile(r"^(/V3|/V4)?" + pattern)
pat = re.compile(r"^(/V3|/V4|/VA)?" + pattern)
match = pat.search(filename)
if match:
if len(match.groups()) > 0 and match.groups()[0] in ['/V3', '/V4']:
if len(match.groups()) > 0 and match.groups()[0] in ['/V3', '/V4', '/VA']:
norm_filename = filename.removeprefix(match.groups()[0])
if replacement != filename:
replacement = match.groups()[0] + replacement
Expand Down Expand Up @@ -236,7 +236,7 @@ def push_file(self, filename, pkg_name):
# Explicit file packaging
for k, v in self.file_maps.items():
for match_name in v['files']:
match = re.search(r"^/(V3|V4)", filename)
match = re.search(r"^/(V3|V4|VA)", filename)
norm_filename = filename if not match else filename.removeprefix(match.group())
if isinstance(match_name, str):
if norm_filename == match_name:
Expand Down
Loading
Loading