Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
b85e83c3
Commit
b85e83c3
authored
Nov 01, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add PYTHONPATH for extension's install.py
parent
d35bf649
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
launch.py
launch.py
+6
-3
No files found.
launch.py
View file @
b85e83c3
...
@@ -17,11 +17,11 @@ def extract_arg(args, name):
...
@@ -17,11 +17,11 @@ def extract_arg(args, name):
return
[
x
for
x
in
args
if
x
!=
name
],
name
in
args
return
[
x
for
x
in
args
if
x
!=
name
],
name
in
args
def
run
(
command
,
desc
=
None
,
errdesc
=
None
):
def
run
(
command
,
desc
=
None
,
errdesc
=
None
,
custom_env
=
None
):
if
desc
is
not
None
:
if
desc
is
not
None
:
print
(
desc
)
print
(
desc
)
result
=
subprocess
.
run
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
shell
=
True
)
result
=
subprocess
.
run
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
shell
=
True
,
env
=
os
.
environ
if
custom_env
is
None
else
custom_env
)
if
result
.
returncode
!=
0
:
if
result
.
returncode
!=
0
:
...
@@ -115,7 +115,10 @@ def run_extensions_installers():
...
@@ -115,7 +115,10 @@ def run_extensions_installers():
continue
continue
try
:
try
:
print
(
run
(
f
'"{python}" "{path_installer}"'
,
errdesc
=
f
"Error running install.py for extension {dirname_extension}"
))
env
=
os
.
environ
.
copy
()
env
[
'PYTHONPATH'
]
=
os
.
path
.
abspath
(
"."
)
print
(
run
(
f
'"{python}" "{path_installer}"'
,
errdesc
=
f
"Error running install.py for extension {dirname_extension}"
,
custom_env
=
env
))
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
,
file
=
sys
.
stderr
)
print
(
e
,
file
=
sys
.
stderr
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment