Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Merge requests
!200
do_tests.zsh: Use pg_extensions env var if it has values
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
do_tests.zsh: Use pg_extensions env var if it has values
topic/default/pg_extensions
into
branch/default
Overview
0
Commits
2
Pipelines
0
Changes
1
Merged
Vincent Hatakeyama
requested to merge
topic/default/pg_extensions
into
branch/default
1 year ago
Overview
0
Commits
2
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
47ab21cc
Prev
Next
Show latest version
1 file
+
8
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
47ab21cc
· 47ab21cc
Vincent Hatakeyama
authored
1 year ago
odoo_scripts/__init__.py
+
8
−
9
Options
@@ -3,26 +3,25 @@ from json import loads
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
,
version
,
)
# 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
"
)
json
=
loads
(
distrib
.
read_text
(
"
direct_url.json
"
)
)
if
not
json
.
get
(
"
dir_info
"
,
{}).
get
(
"
editable
"
,
False
)
:
__version__
=
distrib
.
version
e
lse
:
__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
"
,
Fa
lse
)
:
__version__
=
distrib
.
version
except
PackageNotFoundError
:
__version__
=
_manual_version
pass
__author__
=
"
XCG Consulting
"
Loading