Automated g4 rollback of changelist 155505438

PiperOrigin-RevId: 156053314
This commit is contained in:
A. Unique TensorFlower 2017-05-15 07:53:51 -07:00 committed by TensorFlower Gardener
parent 68d198ee49
commit a3f1377b38
9 changed files with 37 additions and 23 deletions

View File

@ -12,7 +12,6 @@ RUN /install/install_bazel.sh
# Set up the master bazelrc configuration file.
COPY install/.bazelrc /etc/bazel.bazelrc
RUN echo "import %workspace%/.tf_configure.bazelrc" >> /etc/bazel.bazelrc
# Install extra libraries for android sdk.
RUN apt-get update && apt-get install -y \

View File

@ -17,4 +17,3 @@ RUN /install/install_golang.sh
# Set up the master bazelrc configuration file.
COPY install/.bazelrc /etc/bazel.bazelrc
RUN echo "import %workspace%/.tf_configure.bazelrc" >> /etc/bazel.bazelrc

View File

@ -24,4 +24,3 @@ RUN pip install --upgrade virtualenv
# Set up the master bazelrc configuration file.
COPY install/.bazelrc /etc/bazel.bazelrc
RUN echo "import %workspace%/.tf_configure.bazelrc" >> /etc/bazel.bazelrc

View File

@ -19,7 +19,6 @@ RUN /install/install_golang.sh
# Set up the master bazelrc configuration file.
COPY install/.bazelrc /etc/bazel.bazelrc
RUN echo "import %workspace%/.tf_configure.bazelrc" >> /etc/bazel.bazelrc
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
# Configure the build for our CUDA configuration.

View File

@ -27,7 +27,6 @@ RUN /install/build_and_install_clang.sh
# Set up the master bazelrc configuration file.
COPY install/.bazelrc /etc/bazel.bazelrc
RUN echo "import %workspace%/.tf_configure.bazelrc" >> /etc/bazel.bazelrc
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
# Configure the build for our CUDA configuration.

View File

@ -16,4 +16,3 @@ RUN /install/install_hadoop.sh
# Set up the master bazelrc configuration file.
COPY install/.bazelrc /etc/bazel.bazelrc
RUN echo "import %workspace%/.tf_configure.bazelrc" >> /etc/bazel.bazelrc

View File

@ -66,8 +66,6 @@ RUN echo "startup --batch" >>/etc/bazel.bazelrc
# https://github.com/bazelbuild/bazel/issues/418
RUN echo "build --spawn_strategy=standalone --genrule_strategy=standalone" \
>>/etc/bazel.bazelrc
RUN echo "import %workspace%/.tf_configure.bazelrc" >> /etc/bazel.bazelrc
# Install the most recent bazel release.
ENV BAZEL_VERSION 0.4.5
WORKDIR /

View File

@ -66,8 +66,6 @@ RUN echo "startup --batch" >>/etc/bazel.bazelrc
# https://github.com/bazelbuild/bazel/issues/418
RUN echo "build --spawn_strategy=standalone --genrule_strategy=standalone" \
>>/etc/bazel.bazelrc
RUN echo "import %workspace%/.tf_configure.bazelrc" >> /etc/bazel.bazelrc
# Install the most recent bazel release.
ENV BAZEL_VERSION 0.4.5
WORKDIR /

View File

@ -149,6 +149,39 @@ def _genrule(src_dir, genrule_name, command, outs):
)
def _get_python_lib(repository_ctx, python_bin):
"""Gets the python lib path."""
print_lib = ("<<END\n" +
"from __future__ import print_function\n" +
"import site\n" +
"import os\n" +
"\n" +
"try:\n" +
" input = raw_input\n" +
"except NameError:\n" +
" pass\n" +
"\n" +
"python_paths = []\n" +
"if os.getenv('PYTHONPATH') is not None:\n" +
" python_paths = os.getenv('PYTHONPATH').split(':')\n" +
"try:\n" +
" library_paths = site.getsitepackages()\n" +
"except AttributeError:\n" +
" from distutils.sysconfig import get_python_lib\n" +
" library_paths = [get_python_lib()]\n" +
"all_paths = set(python_paths + library_paths)\n" +
"paths = []\n" +
"for path in all_paths:\n" +
" if os.path.isdir(path):\n" +
" paths.append(path)\n" +
"if len(paths) >=1:\n" +
" print(paths[0])\n" +
"END")
cmd = '%s - %s' % (python_bin, print_lib)
result = repository_ctx.execute(["bash", "-c", cmd])
return result.stdout.strip('\n')
def _check_python_lib(repository_ctx, python_lib):
"""Checks the python lib path."""
cmd = 'test -d "%s" -a -x "%s"' % (python_lib, python_lib)
@ -201,19 +234,10 @@ def _create_local_python_repository(repository_ctx):
if repository_ctx.attr.local_checks:
python_bin = _get_env_var(repository_ctx, _PYTHON_BIN_PATH)
_check_python_bin(repository_ctx, python_bin)
python_lib = _get_env_var(repository_ctx, _PYTHON_LIB_PATH, '')
if python_lib == '':
# If we could not find the python lib we will create an empty config that
# will allow non-compilation targets to build correctly (e.g., smoke
# tests).
empty_config = True
_python_configure_warning('PYTHON_LIB_PATH was not set;' +
' python setup cannot complete successfully.' +
' Please run ./configure.')
else:
_check_python_lib(repository_ctx, python_lib)
python_include = _get_python_include(repository_ctx, python_bin)
numpy_include = _get_numpy_include(repository_ctx, python_bin) + '/numpy'
python_lib = _get_env_var(repository_ctx, _PYTHON_LIB_PATH, _get_python_lib(repository_ctx, python_bin))
_check_python_lib(repository_ctx, python_lib)
python_include = _get_python_include(repository_ctx, python_bin)
numpy_include = _get_numpy_include(repository_ctx, python_bin) + '/numpy'
else:
# Otherwise, we assume user provides all paths (via ENV or attrs)
python_include = _get_env_var(repository_ctx, _PYTHON_INCLUDE_PATH,