title: How to obtain arguments passed to setup.py from pip with '--install-option'?
body: <p>I am using pip 1.4.1, attempting to install a package from a local path, for example:</p>
  
  <pre><code>pip install /path/to/my/local/package
  </code></pre>
  
  <p>This does what I want, which is more or less the equivalent of running <code>python /path/to/my/local/package/setup.py install</code>, but I would like to pass some additional options/arguments to my package's setup.py install.</p>
  
  <p>I understand <a href="http://www.pip-installer.org/en/latest/usage.html#install-install-option" rel="noreferrer">from the pip documentation</a> that this is possible with the <code>--install-option</code> option, for example:</p>
  
  <pre><code>pip install --install-option="--some-option" /path/to/my/local/package
  </code></pre>
  
  <p><a href="https://groups.google.com/forum/#!topic/python-virtualenv/a6yFIT9KDwI" rel="noreferrer">This post</a> from the python-virtualenv Google Group suggests this is possible.</p>
  
  <p>What I do not understand is how to obtain the passed-in "--some-option" from within setup.py. I tried looking at <code>sys.argv</code>, but no matter what I put for "--install-option=", <code>sys.argv</code> is always this:</p>
  
  <pre><code>['-c', 'egg_info', '--egg-base', 'pip-egg-info']
  </code></pre>
  
  <p>How can I get the values of things passed in as "--install-option" from pip install?</p>