setup.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. """django-nose packaging."""
  2. from __future__ import unicode_literals
  3. import os
  4. from codecs import open
  5. from setuptools import setup, find_packages
  6. def get_long_description(title):
  7. """Create the long_description from other files."""
  8. ROOT = os.path.abspath(os.path.dirname(__file__))
  9. readme = open(os.path.join(ROOT, 'README.rst'), 'r', 'utf8').read()
  10. body_tag = ".. Omit badges from docs"
  11. readme_body_start = readme.index(body_tag)
  12. assert readme_body_start
  13. readme_body = readme[readme_body_start + len(body_tag):]
  14. changelog = open(os.path.join(ROOT, 'changelog.rst'), 'r', 'utf8').read()
  15. old_tag = ".. Omit older changes from package"
  16. changelog_body_end = changelog.index(old_tag)
  17. assert changelog_body_end
  18. changelog_body = changelog[:changelog_body_end]
  19. bars = '=' * len(title)
  20. long_description = """
  21. %(bars)s
  22. %(title)s
  23. %(bars)s
  24. %(readme_body)s
  25. %(changelog_body)s
  26. _(Older changes can be found in the full documentation)._
  27. """ % locals()
  28. return long_description
  29. setup(
  30. name='django-nose',
  31. version='1.4.5',
  32. description='Makes your Django tests simple and snappy',
  33. long_description=get_long_description('django-nose'),
  34. author='Jeff Balogh',
  35. author_email='me@jeffbalogh.org',
  36. maintainer='Erik Rose',
  37. maintainer_email='erikrose@grinchcentral.com',
  38. url='http://github.com/django-nose/django-nose',
  39. license='BSD',
  40. packages=find_packages(exclude=['testapp', 'testapp/*']),
  41. include_package_data=True,
  42. zip_safe=False,
  43. install_requires=['nose>=1.2.1'],
  44. test_suite='testapp.runtests.runtests',
  45. # This blows up tox runs that install django-nose into a virtualenv,
  46. # because it causes Nose to import django_nose.runner before the Django
  47. # settings are initialized, leading to a mess of errors. There's no reason
  48. # we need FixtureBundlingPlugin declared as an entrypoint anyway, since you
  49. # need to be using django-nose to find the it useful, and django-nose knows
  50. # about it intrinsically.
  51. # entry_points="""
  52. # [nose.plugins.0.10]
  53. # fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin
  54. # """,
  55. keywords='django nose django-nose',
  56. classifiers=[
  57. 'Development Status :: 5 - Production/Stable',
  58. 'Environment :: Web Environment',
  59. 'Framework :: Django',
  60. 'Intended Audience :: Developers',
  61. 'License :: OSI Approved :: BSD License',
  62. 'Operating System :: OS Independent',
  63. 'Programming Language :: Python',
  64. 'Programming Language :: Python :: 2',
  65. 'Programming Language :: Python :: 2.6',
  66. 'Programming Language :: Python :: 2.7',
  67. 'Programming Language :: Python :: 3',
  68. 'Programming Language :: Python :: 3.4',
  69. 'Programming Language :: Python :: 3.5',
  70. 'Topic :: Software Development :: Testing'
  71. ]
  72. )