mirror of
https://github.com/markqvist/rnsh.git
synced 2025-01-20 19:21:34 -05:00
Merge pull request #19 from markqvist/python_compat
Missing version resolution
This commit is contained in:
commit
3dd98d7e9f
@ -31,7 +31,11 @@ def _get_version():
|
||||
import tomli
|
||||
return tomli.load(open(os.path.join(os.path.dirname(module_dir), "pyproject.toml"), "rb"))["tool"]["poetry"]["version"]
|
||||
except:
|
||||
return "0.0.0"
|
||||
try:
|
||||
import pkg_resources
|
||||
return pkg_resources.get_distribution("rnsh").version
|
||||
except:
|
||||
return "0.0.0"
|
||||
|
||||
except:
|
||||
return "0.0.0"
|
||||
|
Loading…
Reference in New Issue
Block a user