sagemath/sage

src/bin/sage-venv-config: Do not fail if sage_conf is not available

mkoeppe opened this issue · 8 comments

(from #30013)

if sage_conf is not installed, because VERSION is defined there

Traceback (most recent call last):
  File "/usr/bin/sage-venv-config", line 29, in <module>
    _main()
  File "/usr/bin/sage-venv-config", line 17, in _main
    version='%(prog)s ' + VERSION)
NameError: name 'VERSION' is not defined

CC: @antonio-rojas @slel

Component: scripts

Author: Matthias Koeppe

Branch/Commit: 93a9fcf

Reviewer: Antonio Rojas

Issue created by migration from https://trac.sagemath.org/ticket/31058

Description changed:

--- 
+++ 
@@ -1,2 +1,12 @@
 (from #30013)
 
+if `sage_conf` is not installed, because `VERSION` is defined there
+
+```
+Traceback (most recent call last):
+  File "/usr/bin/sage-venv-config", line 29, in <module>
+    _main()
+  File "/usr/bin/sage-venv-config", line 17, in _main
+    version='%(prog)s ' + VERSION)
+NameError: name 'VERSION' is not defined
+```

Author: Matthias Koeppe

Commit: 93a9fcf

comment:3

Something like this should work


New commits:

93a9fcfsrc/bin/sage-venv-config: Import VERSION from sage.version
comment:4

Thanks

slel commented

Reviewer: Antonio Rojas