Skip to content

Commit

Permalink
sagemath#34995: support debian version of tachyon
Browse files Browse the repository at this point in the history
Debian patches tachyon so it won't report the version.

We hardcode '0.99' since that's the version they ship.
  • Loading branch information
tornaria committed Feb 9, 2023
1 parent 5734d2a commit 1ccd607
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/sage/interfaces/tachyon.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,14 +865,17 @@ def version(self):
TESTS::
sage: tachyon_rt.version() # not tested
sage: tachyon_rt.version() # random
0.98.9
sage: tachyon_rt.version() >= '0.98.9'
True
"""
with os.popen('tachyon') as f:
r = f.read()
return re.search(r"Version ([\d.]*)", r)[1]
r = f.readline()
res = re.search(r"Version ([\d.]*)", r)
# debian patches tachyon so it won't report the version
# we hardcode '0.99' since that's indeed the version they ship
return res[1] if res else '0.99'

def help(self, use_pager=True):
"""
Expand Down

0 comments on commit 1ccd607

Please sign in to comment.