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
Commits
47ab21ccfe06
Commit
47ab21ccfe06
authored
1 year ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
parent
959d450fc171
No related branches found
Branches containing commit
Tags
20.11.0
Tags containing commit
1 merge request
!200
📝 do_tests.zsh: Use pg_extensions env var if it has values
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
odoo_scripts/__init__.py
+8
-9
8 additions, 9 deletions
odoo_scripts/__init__.py
with
8 additions
and
9 deletions
odoo_scripts/__init__.py
+
8
−
9
View file @
47ab21cc
...
...
@@ -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
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
:
...
...
@@ -24,5 +23,5 @@
except
PackageNotFoundError
:
__version__
=
_manual_version
pass
__author__
=
"
XCG Consulting
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment