mirror of
https://github.com/markqvist/rnsh.git
synced 2025-05-31 19:54:28 -04:00
Fixed missing version resolution without pyproject.toml
This commit is contained in:
parent
494ebb29fb
commit
4897cd0387
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue