title: How to use Bazel's py_library imports argument
body: <p>I'm trying to use Boto3 in a Bazel built project but can't seem to get the correct import for the library. Because of the Boto git repository, all the sources are in folders named <code>botocore</code> and <code>boto3</code> in the root of the repository. The imports are all <code>boto3.boto3</code>, with the first corresponding the name of the external dependency and second being the root folder in which the reside. How do I use the <code>imports</code> attribute of <code>py_binary</code> and <code>py_library</code> rules to import from the inner <code>boto3</code> instead of the other one?</p>
  
  <p>This is what my workspace looks like:</p>
  
  <p><code>//WORKSPACE</code></p>
  
  <pre><code>BOTOCORE_BUILD_FILE = """
  
  py_library(
      name = "botocore",
      srcs = glob([ "botocore/**/*.py" ]),
      imports = [ "botocore" ],
      visibility = [ "//visibility:public" ],
  )
  
  """
  
  _BOTO3_BUILD_FILE = """
  
  py_library(
      name = "boto3",
      srcs = glob([ "boto3/**/*.py" ]),
      imports = [ "boto3" ],
      deps = [ "@botocore//:botocore" ],
      visibility = [ "//visibility:public" ],
  )
  
  """
  
  new_git_repository(
      name = "botocore",
      commit = "cc3da098d06392c332a60427ff434aa51ba31699",
      remote = "https://github.com/boto/botocore.git",
      build_file_content = _BOTOCORE_BUILD_FILE,
  )
  
  new_git_repository(
      name = "boto3",
      commit = "8227503d7b1322b45052a16b197ac41fedd634e9", # 1.4.4
      remote = "https://github.com/boto/boto3.git",
      build_file_content = _BOTO3_BUILD_FILE,
  )
  </code></pre>
  
  <p><code>//BUILD</code></p>
  
  <pre><code>py_binary(
      name = "example",
      srcs = [ "example.py" ],
      deps = [
          "@boto3//:boto3",
      ],
  )
  </code></pre>
  
  <p><code>//example.py</code></p>
  
  <pre><code>import boto3
  
  boto3.client('')
  </code></pre>
  
  <p>Checking for the contents of the build folder</p>
  
  <pre><code>$ ls bazel-bin/example.runfiles/*
  bazel-bin/example.runfiles/__init__.py bazel-bin/example.runfiles/MANIFEST
  
  bazel-bin/example.runfiles/boto3:
  boto3  __init__.py
  
  bazel-bin/example.runfiles/botocore:
  botocore  __init__.py
  </code></pre>
  
  <p>When I try to run the example script I get <code>AttributeError: 'module' object has no attribute 'client'</code> I can <code>import boto3.boto3</code> but then using anything in it results in missing dependencies such as <code>boto3.sessions</code> because everything is nested in <code>&lt;target-name&gt;.boto3</code></p>