title: Best practices: how do you list required dependencies in your setup.py?
body: <p>This is how I do it currently:</p>
  
  <pre><code>import os
  from setuptools import setup, find_packages
  here = os.path.abspath(os.path.dirname(__file__))
  
  requires = [
      'pyramid',
      'pyramid_debugtoolbar',
      'waitress',
      'requests',
      'mock',
      'gunicorn',
      'mongoengine',
      ]
  
  setup(name='repoapi',
        version='0.0',
        description='repoapi',
        packages=find_packages(),
        include_package_data=True,
        zip_safe=False,
        install_requires=requires,
        tests_require=requires,
        test_suite="repoapi",
        entry_points="""\
        [paste.app_factory]
        main = repoapi:main
        """,
        )
  </code></pre>
  
  <p>Is this an okay way? I have some troubles. For example, for pyramid, I cannot use the system-wide nosetests plugin to run tests. I need to install <code>pyramid</code> in the global python site-packages!</p>
  
  <p>But I don't want that. So I must install nose in the virtualenv of this project. But I don't want it to be a dependency. I don't feel like it should belong to <code>requires</code>. It isn't. Yet, I also don't want to install by hand all the time. Yeah I know I have a lot of I don't want to do this and that...</p>
  
  <p>But how would you solve that? I don't want to tamper the global python site-packages, but I want to install nose as part of the virtualenv.</p>
  
  <p>Also, pip install requirement files. It's slightly more accurate because I don't need to specify the version manually and I don't need to be afraid of updating setup.py manually. Just throw <code>pip freeze &gt; file.txt</code> and done.</p>
  
  <p>However, pip can return garbage because we throw garbage packages into virtualenv. </p>
  
  <p>So many blades. What's the best practice? How do you deal with these issues? </p>
  
  <p>Maybe I missed it, but <a href="https://github.com/django/django/blob/master/setup.py" rel="noreferrer">https://github.com/django/django/blob/master/setup.py</a>, how did Django do it?</p>