Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
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
Branches containing commit
No related tags found
Tags containing commit
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)
cd
"
$DIR
/.."
||
exit
PYTHONPATH
=
$(
readlink
-f
"
$(
pwd
)
"
)
export
PYTHONPATH
echo
"
$PYTHONPATH
"
# Do not override PYTHONPATH if we are in a virtual env
if
[
"
$VIRTUAL_ENV
"
=
""
]
;
then
PYTHONPATH
=
$(
readlink
-f
"
$(
pwd
)
"
)
export
PYTHONPATH
echo
"
$PYTHONPATH
"
fi
# Create servers which listen on HTTP at 808x and HTTPS at 848x.
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