Skip to content

Commit 841ffa6

Browse files
authored
Fix fujinet-lib version finding (#148)
1 parent 4d97467 commit 841ffa6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

makefiles/fnlib.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(self, FUJINET_LIB, PLATFORM, COMBOS, skipIfMissing=False):
8787
self.LIBRARY_REGEX = []
8888
for platform in self.possiblePlatforms:
8989
self.LIBRARY_REGEX.extend([
90-
fr"fujinet[-.]({platform})-({VERSION_NUM_RE})?[.]lib$",
90+
fr"fujinet[-.]({platform})(-{VERSION_NUM_RE})?[.]lib$",
9191
fr"fujinet[.]lib[.]({platform})$",
9292
fr"libfujinet[.]({platform})[.]a$",
9393
])
@@ -177,8 +177,8 @@ def fixupLibraryFilename(self, filename):
177177
def setPlatformVersion(self, rxm):
178178
if len(rxm.groups()) >= 1:
179179
self.MV.FUJINET_LIB_PLATFORM = rxm.group(1)
180-
if len(rxm.groups()) >= 2:
181-
self.MV.FUJINET_LIB_VERSION = rxm.group(2)
180+
if len(rxm.groups()) >= 3:
181+
self.MV.FUJINET_LIB_VERSION = rxm.group(3)
182182
return
183183

184184
def getVersion(self):
@@ -283,13 +283,13 @@ def gitClone(self, url):
283283
cmd = ["git", "clone", url]
284284
if branch:
285285
cmd.extend(["-b", branch])
286-
subprocess.run(cmd, cwd=FUJINET_CACHE_DIR, check=True)
286+
subprocess.run(cmd, cwd=FUJINET_CACHE_DIR, check=True, stdout=sys.stderr)
287287

288288
possibleOutput = ["build", *[f"r2r/{p}" for p in self.possiblePlatforms]]
289289
self.findLibraryDir(repoDir, possibleOutput)
290290
if not self.MV.FUJINET_LIB_FILE:
291291
cmd = ["make", ]
292-
subprocess.run(cmd, cwd=repoDir, check=True)
292+
subprocess.run(cmd, cwd=repoDir, check=True, stdout=sys.stderr)
293293
self.findLibraryDir(repoDir, possibleOutput)
294294

295295
return

0 commit comments

Comments
 (0)