Adding pyyaml to mac and windows builds

Summary: Closes https://github.com/pytorch/pytorch/pull/8851

Reviewed By: mingzhe09088

Differential Revision: D8666075

Pulled By: pjh5

fbshipit-source-id: a3fdc9f9801f814b1e4010bd20ba51afbb048a1d
This commit is contained in:
Jesse Hellemn 2018-06-27 13:01:51 -07:00 committed by Facebook Github Bot
parent 624303340e
commit a898a8f1f0
2 changed files with 9 additions and 0 deletions

View file

@ -31,6 +31,12 @@ if [ -n "${USE_ANACONDA}" ]; then
export CONDA_INSTALL_LOCALLY=1
"${ROOT_DIR}/scripts/build_anaconda.sh" "$@"
else
# Make sure that pyyaml is installed for the codegen of building Aten to work
if [[ -n "$(python -c 'import yaml' 2>&1)" ]]; then
echo "Installing pyyaml with pip at $(which pip)"
pip install --user pyyaml
fi
# Build protobuf compiler from third_party if configured to do so
if [ -n "${USE_HOST_PROTOC:-}" ]; then
echo "USE_HOST_PROTOC is set; building protoc before building Caffe2..."

View file

@ -37,6 +37,9 @@ if NOT DEFINED CMAKE_GENERATOR (
)
)
:: Install pyyaml for Aten codegen
pip install pyyaml
echo CAFFE2_ROOT=%CAFFE2_ROOT%
echo CMAKE_GENERATOR=%CMAKE_GENERATOR%
echo CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%