title: pkg_resources.DistributionNotFound when using a module installed from a bdist_rpm
body: <p>I am trying to create a rpm of a CLI tool I have built. The rpm is being created and is installing without errors. However, when I try to use the CLI I get the following exception:</p>
  
  <pre><code>    Traceback (most recent call last):
            File "/usr/local/bin/my_project", line 5, in &lt;module&gt;
              from pkg_resources import load_entry_point
            File "/usr/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 3141, in &lt;module&gt;
              @_call_aside
            File "/usr/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 3127, in _call_aside
              f(*args, **kwargs)
            File "/usr/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 3154, in _initialize_master_working_set
              working_set = WorkingSet._build_master()
            File "/usr/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 640, in _build_master
              ws.require(__requires__)
            File "/usr/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 941, in require
              needed = self.resolve(parse_requirements(requirements))
            File "/usr/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 828, in resolve
              raise DistributionNotFound(req, requirers)
          pkg_resources.DistributionNotFound: The 'my-project==0.1.0' distribution was not found and is required by the application
  </code></pre>
  
  <p>I tried to create a bare bones application with just following files to get it to work but I still get the same exception</p>
  
  <p><code>project/setup.py</code></p>
  
  <pre><code>import sys
  
  def main(args=None):
       print("Do Something")
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>Then <code>project/my_project/__main__.py</code></p>
  
  <pre><code>from setuptools import setup
  
  setup(name='my_project',
      version='0.1.0',
      packages=['my_project'],
      entry_points={
          'console_scripts': [
              'my_project = my_project.__main__:main'
          ]
       },
  )
  </code></pre>
  
  <p>I am creating the rpm with the command <code>python setup.py bdist_rpm</code></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The reason is my_project is being installed to usr/local/lib instead of /usr/lib. How can I change the default path?</p>