Skip to content

Commit

Permalink
add python mac target
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Feb 4, 2016
1 parent e320dca commit e066717
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 6 additions & 2 deletions tools/run_tests/artifact_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,20 @@ def build_jobspec(self):
if self.platform == 'windows':
raise Exception('Not supported yet.')
else:
environ = {}
if self.platform == 'linux':
environ = {}
environ['BDIST_WHEEL_MAYBE'] = 'bdist_wheel'
if self.arch == 'x86':
environ['SETARCH_CMD'] = 'linux32'
return create_docker_jobspec(self.name,
'tools/dockerfile/grpc_artifact_linux_%s' % self.arch,
'tools/run_tests/build_artifact_python.sh',
environ=environ)
else:
environ['SKIP_PIP_INSTALL'] = 'TRUE'
return create_jobspec(self.name,
['tools/run_tests/build_artifact_python.sh'])
['tools/run_tests/build_artifact_python.sh'],
environ=environ)

def __str__(self):
return self.name
Expand Down Expand Up @@ -231,6 +234,7 @@ def targets():
for arch in ('x86', 'x64')] +
[PythonArtifact('linux', 'x86'),
PythonArtifact('linux', 'x64'),
PythonArtifact('macos', 'x64'),
RubyArtifact('linux', 'x86'),
RubyArtifact('linux', 'x64'),
RubyArtifact('macos', 'x64')])
12 changes: 7 additions & 5 deletions tools/run_tests/build_artifact_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ set -ex

cd $(dirname $0)/../..

pip install --upgrade six
pip install --upgrade setuptools

pip install -rrequirements.txt
if [ "$SKIP_PIP_INSTALL" == "" ]
then
pip install --upgrade six
pip install --upgrade setuptools
pip install -rrequirements.txt
fi

GRPC_PYTHON_BUILD_WITH_CYTHON=1 ${SETARCH_CMD} python setup.py \
bdist_wheel \
${BDIST_WHEEL_MAYBE} \
sdist \
bdist_egg_grpc_custom

Expand Down

0 comments on commit e066717

Please sign in to comment.