Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
1fd1856a
Unverified
Commit
1fd1856a
authored
2 years ago
by
Mathieu Velten
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
demo: check if we are in a virtualenv before overriding PYTHONPATH (#12916)
parent
7f92ac4c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/12916.misc
+1
-0
1 addition, 0 deletions
changelog.d/12916.misc
demo/start.sh
+6
-5
6 additions, 5 deletions
demo/start.sh
with
7 additions
and
5 deletions
changelog.d/12916.misc
0 → 100644
+
1
−
0
View file @
1fd1856a
Check if we are in a virtual environment before overriding the `PYTHONPATH` environment variable in the demo script.
This diff is collapsed.
Click to expand it.
demo/start.sh
+
6
−
5
View file @
1fd1856a
...
@@ -6,11 +6,12 @@ CWD=$(pwd)
...
@@ -6,11 +6,12 @@ CWD=$(pwd)
cd
"
$DIR
/.."
||
exit
cd
"
$DIR
/.."
||
exit
PYTHONPATH
=
$(
readlink
-f
"
$(
pwd
)
"
)
# Do not override PYTHONPATH if we are in a virtual env
export
PYTHONPATH
if
[
"
$VIRTUAL_ENV
"
=
""
]
;
then
PYTHONPATH
=
$(
readlink
-f
"
$(
pwd
)
"
)
export
PYTHONPATH
echo
"
$PYTHONPATH
"
echo
"
$PYTHONPATH
"
fi
# Create servers which listen on HTTP at 808x and HTTPS at 848x.
# Create servers which listen on HTTP at 808x and HTTPS at 848x.
for
port
in
8080 8081 8082
;
do
for
port
in
8080 8081 8082
;
do
...
...
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