Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
tci-gateway-module
Grpc
Commits
0bd13ed8
Commit
0bd13ed8
authored
8 years ago
by
Masood Malekghassemi
Browse files
Options
Downloads
Patches
Plain Diff
Fall back to default python for test virtualenvs
parent
6db60b90
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/run_tests/build_python.sh
+13
-1
13 additions, 1 deletion
tools/run_tests/build_python.sh
with
13 additions
and
1 deletion
tools/run_tests/build_python.sh
+
13
−
1
View file @
0bd13ed8
...
@@ -33,6 +33,7 @@ set -ex
...
@@ -33,6 +33,7 @@ set -ex
# change to grpc repo root
# change to grpc repo root
cd
$(
dirname
$0
)
/../..
cd
$(
dirname
$0
)
/../..
# Arguments
PYTHON
=
${
1
:-
python2
.7
}
PYTHON
=
${
1
:-
python2
.7
}
VENV
=
${
2
:-
py27
}
VENV
=
${
2
:-
py27
}
VENV_RELATIVE_PYTHON
=
${
3
:-
bin
/python
}
VENV_RELATIVE_PYTHON
=
${
3
:-
bin
/python
}
...
@@ -42,6 +43,10 @@ ROOT=`pwd`
...
@@ -42,6 +43,10 @@ ROOT=`pwd`
export
CFLAGS
=
"-I
$ROOT
/include -std=gnu99 -fno-wrapv"
export
CFLAGS
=
"-I
$ROOT
/include -std=gnu99 -fno-wrapv"
export
GRPC_PYTHON_BUILD_WITH_CYTHON
=
1
export
GRPC_PYTHON_BUILD_WITH_CYTHON
=
1
# Default python on the host to fall back to when instantiating e.g. the
# virtualenv.
HOST_PYTHON
=
${
HOST_PYTHON
:-
python
}
# If ccache is available, use it... unless we're on Mac, then all hell breaks
# If ccache is available, use it... unless we're on Mac, then all hell breaks
# loose because Python does hacky things to support other hacky things done to
# loose because Python does hacky things to support other hacky things done to
# hacky things on Mac OS X
# hacky things on Mac OS X
...
@@ -71,7 +76,14 @@ if [ "$CONFIG" = "gcov" ]; then
...
@@ -71,7 +76,14 @@ if [ "$CONFIG" = "gcov" ]; then
export
GRPC_PYTHON_ENABLE_CYTHON_TRACING
=
1
export
GRPC_PYTHON_ENABLE_CYTHON_TRACING
=
1
fi
fi
(
$PYTHON
-m
virtualenv
$VENV
||
true
)
# Instnatiate the virtualenv, preferring to do so from the relevant python
# version. Even if these commands fail (e.g. on Windows due to name conflicts)
# it's possible that the virtualenv is still usable and we trust the tester to
# be able to 'figure it out' instead of us e.g. doing potentially expensive and
# unnecessary error recovery by `rm -rf`ing the virtualenv.
(
$PYTHON
-m
virtualenv
$VENV
||
$HOST_PYTHON
-m
virtualenv
-p
$PYTHON
$VENV
||
true
)
VENV_PYTHON
=
`
$REALPATH
-s
"
$VENV
/
$VENV_RELATIVE_PYTHON
"
`
VENV_PYTHON
=
`
$REALPATH
-s
"
$VENV
/
$VENV_RELATIVE_PYTHON
"
`
# pip-installs the directory specified. Used because on MSYS the vanilla Windows
# pip-installs the directory specified. Used because on MSYS the vanilla Windows
...
...
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