Commit b15240f4 authored by Lionel Torti's avatar Lionel Torti

Fixed a few issues with act and wheel creation.

parent 44a2c7c7
...@@ -77,7 +77,7 @@ def go(current): ...@@ -77,7 +77,7 @@ def go(current):
except CalledProcessError as err: except CalledProcessError as err:
critic("Failed building pyAgrum", rc=err.returncode) critic("Failed building pyAgrum", rc=err.returncode)
finally: finally:
"shutil.rmtree(tmp, True)" shutil.rmtree(tmp, True)
def prepare(current, tmp): def prepare(current, tmp):
"""Prepare step for building the wheel: builds and install pyAgrum in the temporary """Prepare step for building the wheel: builds and install pyAgrum in the temporary
...@@ -165,11 +165,14 @@ def get_pyAgrum_version(path): ...@@ -165,11 +165,14 @@ def get_pyAgrum_version(path):
"""Look up the egg-file in the directory path generated by act when """Look up the egg-file in the directory path generated by act when
installing pyAgrum to get pyAgrum's version.""" installing pyAgrum to get pyAgrum's version."""
pattern = '^pyAgrum-([.0-9]+).*$' pattern = '^pyAgrum-([.0-9]+).*$'
files = [f for f in os.listdir(path) if isfile(join(path,f))] try:
for f in files: files = [f for f in os.listdir(path) if isfile(join(path,f))]
m = re.match(pattern, f) for f in files:
if m != None: m = re.match(pattern, f)
return m.group(1) if m != None:
return m.group(1)
except FileNotFoundError:
warn("Error while accessing to path {0}".format(path))
warn("Could not retrieve pyAgrum version.") warn("Could not retrieve pyAgrum version.")
return "" return ""
......
Markdown is supported
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