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
c331c154d249
Commit
c331c154d249
authored
5 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
in conf2reST, use pip3 when pip is not found
parent
f550ff30da97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
conf2reST.py
+9
-1
9 additions, 1 deletion
conf2reST.py
with
9 additions
and
1 deletion
conf2reST.py
+
9
−
1
View file @
c331c154
...
...
@@ -97,7 +97,15 @@
# pip freeze
reqs
=
dict
()
for
element
in
subprocess
.
check_output
([
'
pip
'
,
'
freeze
'
]).
split
():
try
:
pip_freeze
=
subprocess
.
check_output
([
'
pip
'
,
'
freeze
'
])
except
OSError
as
e
:
if
e
.
errno
==
os
.
errno
.
ENOENT
:
pip_freeze
=
subprocess
.
check_output
([
'
pip3
'
,
'
freeze
'
])
else
:
# Something else went wrong
raise
for
element
in
pip_freeze
.
split
():
lib_and_version
=
element
.
decode
(
'
utf-8
'
).
split
(
'
==
'
)
if
len
(
lib_and_version
)
==
1
:
# No explicit version (no ==).
library
,
version
=
lib_and_version
[
0
],
"
N/A
"
...
...
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