title: how to customise files being copied into tmp directory when running a local pip install?
body: <p>I'm trying to pip install the python binding of MXNet library from source code:</p>
  
  <p><a href="https://mxnet.incubator.apache.org/install/ubuntu_setup.html#install-mxnet-for-python" rel="nofollow noreferrer">https://mxnet.incubator.apache.org/install/ubuntu_setup.html#install-mxnet-for-python</a></p>
  
  <p>After the main binary is built successfully using g++, there is no problem in installing its python binding in dev/editable mode:</p>
  
  <p><code>pip install -e .
  </code></p>
  
  <p>however when I try to deploy the full package (instead of just creating a symbolic link)</p>
  
  <p><code>pip install .
  </code></p>
  
  <p>I encounter the following error:</p>
  
  <pre><code>Processing ~/git-fork/mxnet/python
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "/tmp/pip-req-build-k3hfc693/setup.py", line 47, in &lt;module&gt;
          LIB_PATH = libinfo['find_lib_path']()
        File "/tmp/pip-req-build-k3hfc693/mxnet/libinfo.py", line 74, in find_lib_path
          'List of candidates:\n' + str('\n'.join(dll_path)))
      RuntimeError: Cannot find the MXNet library.
      List of candidates:
      /tmp/pip-req-build-k3hfc693/mxnet/libmxnet.so
      /tmp/pip-req-build-k3hfc693/mxnet/../../lib/libmxnet.so
      /tmp/pip-req-build-k3hfc693/mxnet/../../build/libmxnet.so
      ../../../libmxnet.so
  
      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-k3hfc693/
  </code></pre>
  
  <p>It appears that pip didn't copy <code>../../lib/libmxnet.so</code> into tmp since it is outside the python package directory. What should I do to instruct pip to copy that file (and if possible, everything under parent directory) when installing?</p>