projects
/
linpy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
48ede34
)
More robust implementation of isl_version
author
Vivien Maisonneuve
<v.maisonneuve@gmail.com>
Tue, 19 Aug 2014 13:12:46 +0000
(15:12 +0200)
committer
Vivien Maisonneuve
<v.maisonneuve@gmail.com>
Tue, 19 Aug 2014 13:12:46 +0000
(15:12 +0200)
linpy/islhelper.py
patch
|
blob
|
history
diff --git
a/linpy/islhelper.py
b/linpy/islhelper.py
index
c38e734
..
b0dffe7
100644
(file)
--- a/
linpy/islhelper.py
+++ b/
linpy/islhelper.py
@@
-16,6
+16,7
@@
# along with LinPy. If not, see <http://www.gnu.org/licenses/>.
import ctypes, ctypes.util
# along with LinPy. If not, see <http://www.gnu.org/licenses/>.
import ctypes, ctypes.util
+import re
from . import _islhelper
from ._islhelper import *
from . import _islhelper
from ._islhelper import *
@@
-38,7
+39,8
@@
libisl = ctypes.CDLL(ctypes.util.find_library('isl'))
libisl.isl_dim_set = _islhelper.dim_set
libisl.isl_version.restype = ctypes.c_char_p
libisl.isl_dim_set = _islhelper.dim_set
libisl.isl_version.restype = ctypes.c_char_p
-isl_version = libisl.isl_version().decode().strip()[len('isl-'):]
+isl_version = libisl.isl_version().decode().strip()
+isl_version = re.sub(r'^isl-', '', isl_version)
mainctx = libisl.isl_ctx_alloc()
mainctx = libisl.isl_ctx_alloc()