Skip to content
Snippets Groups Projects
Commit 47ab21ccfe06 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:shirt:

parent 959d450fc171
No related branches found
Tags 20.11.0
1 merge request!200📝 do_tests.zsh: Use pg_extensions env var if it has values
......@@ -3,8 +3,8 @@
try:
# python 3.8+
from importlib.metadata import PackageNotFoundError, distribution, version
from importlib.metadata import PackageNotFoundError, distribution
except ModuleNotFoundError:
from importlib_metadata import ( # type: ignore[import,no-redef,assignment]
PackageNotFoundError,
distribution,
......@@ -7,8 +7,7 @@
except ModuleNotFoundError:
from importlib_metadata import ( # type: ignore[import,no-redef,assignment]
PackageNotFoundError,
distribution,
version,
)
# This is maintained by bump2version.
......@@ -12,7 +11,7 @@
)
# This is maintained by bump2version.
_manual_version = "20.10.1.dev"
__version__ = "20.10.1.dev"
try:
# When using an editable install, the number would be off
distrib = distribution("odoo-scripts")
......@@ -16,9 +15,9 @@
try:
# When using an editable install, the number would be off
distrib = distribution("odoo-scripts")
json = loads(distrib.read_text("direct_url.json"))
if not json.get("dir_info", {}).get("editable", False):
__version__ = distrib.version
else:
__version__ = _manual_version
text = distrib.read_text("direct_url.json")
if text is not None:
json = loads(text)
if not json.get("dir_info", {}).get("editable", False):
__version__ = distrib.version
except PackageNotFoundError:
......@@ -24,5 +23,5 @@
except PackageNotFoundError:
__version__ = _manual_version
pass
__author__ = "XCG Consulting"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment