src/bin/sage-venv-config: Do not fail if sage_conf is not available
mkoeppe opened this issue · 8 comments
mkoeppe commented
(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
mkoeppe commented
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
+```mkoeppe commented
mkoeppe commented
Author: Matthias Koeppe
mkoeppe commented
comment:3
Something like this should work
New commits:
93a9fcf | src/bin/sage-venv-config: Import VERSION from sage.version |
antonio-rojas commented
comment:4
Thanks
slel commented
Reviewer: Antonio Rojas
vbraun commented
Changed branch from u/mkoeppe/src_bin_sage_venv_config__do_not_fail_if_sage_conf_is_not_available to 93a9fcf