You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setup.py 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #!/usr/bin/env python
  2. """
  3. Installation script:
  4. To release a new version to PyPi:
  5. - Ensure the version is correctly set in oscar.__init__.py
  6. - Run: make release
  7. """
  8. from setuptools import setup, find_packages
  9. import os
  10. import sys
  11. PROJECT_DIR = os.path.dirname(__file__)
  12. PY3 = sys.version_info >= (3, 0)
  13. sys.path.append(os.path.join(PROJECT_DIR, 'src'))
  14. from oscar import get_version # noqa isort:skip
  15. install_requires = [
  16. 'django>=1.8.8,<1.10',
  17. # PIL is required for image fields, Pillow is the "friendly" PIL fork
  18. 'pillow>=1.7.8',
  19. # We use the ModelFormSetView from django-extra-views for the basket
  20. # page. > 0.6.5 has a bug which causes issues with Django > 1.6,
  21. # https://github.com/AndrewIngram/django-extra-views/issues/114
  22. 'django-extra-views>=0.2,<0.6.5',
  23. # Search support
  24. 'django-haystack>=2.5.0,<2.6.0',
  25. # Treebeard is used for categories
  26. 'django-treebeard>=4.0',
  27. # Sorl is used as the default thumbnailer
  28. 'sorl-thumbnail>=12.4a1',
  29. # Babel is used for currency formatting
  30. 'Babel>=1.0,<3.0',
  31. # For converting non-ASCII to ASCII when creating slugs
  32. 'Unidecode>=0.04.12,<0.05',
  33. # For manipulating search URLs
  34. 'purl>=0.7',
  35. # For phone number field
  36. 'phonenumbers>=6.3.0,<8.0.0',
  37. # Used for oscar.test.contextmanagers.mock_signal_receiver
  38. 'mock>=1.0.1,<2.0',
  39. # Used for oscar.test.newfactories
  40. 'factory-boy>=2.4.1,<2.7',
  41. # Used for automatically building larger HTML tables
  42. 'django-tables2>=1.0.4,<1.1',
  43. # Used for manipulating form field attributes in templates (eg: add
  44. # a css class)
  45. 'django-widget-tweaks>=1.4.1',
  46. ]
  47. docs_requires = [
  48. 'Sphinx==1.3.3',
  49. 'sphinxcontrib-napoleon==0.4.3',
  50. 'sphinx_rtd_theme==0.1.9',
  51. ]
  52. test_requires = [
  53. 'WebTest==2.0.21',
  54. 'coverage==3.7.1',
  55. 'django-webtest==1.7.9',
  56. 'py>=1.4.31',
  57. 'pytest-cov==2.3.0',
  58. 'pytest-django==2.9.1',
  59. 'pytest-xdist==1.14',
  60. 'pytest-warnings==0.1.0',
  61. 'pytest==2.9.2',
  62. 'spec==0.11.1',
  63. 'tox==1.8.1',
  64. ]
  65. setup(
  66. name='django-oscar',
  67. version=get_version().replace(' ', '-'),
  68. url='https://github.com/django-oscar/django-oscar',
  69. author="David Winterbottom",
  70. author_email="david.winterbottom@gmail.com",
  71. description="A domain-driven e-commerce framework for Django",
  72. long_description=open(os.path.join(PROJECT_DIR, 'README.rst')).read(),
  73. keywords="E-commerce, Django, domain-driven",
  74. license='BSD',
  75. platforms=['linux'],
  76. package_dir={'': 'src'},
  77. packages=find_packages('src'),
  78. include_package_data=True,
  79. install_requires=install_requires,
  80. extras_require={
  81. 'docs': docs_requires,
  82. 'test': test_requires,
  83. },
  84. classifiers=[
  85. 'Development Status :: 5 - Production/Stable',
  86. 'Environment :: Web Environment',
  87. 'Framework :: Django',
  88. 'Framework :: Django :: 1.8',
  89. 'Framework :: Django :: 1.9',
  90. 'Intended Audience :: Developers',
  91. 'License :: OSI Approved :: BSD License',
  92. 'Operating System :: Unix',
  93. 'Programming Language :: Python',
  94. 'Programming Language :: Python :: 2',
  95. 'Programming Language :: Python :: 2.7',
  96. 'Programming Language :: Python :: 3',
  97. 'Programming Language :: Python :: 3.3',
  98. 'Programming Language :: Python :: 3.4',
  99. 'Programming Language :: Python :: 3.5',
  100. 'Topic :: Software Development :: Libraries :: Application Frameworks']
  101. )
  102. # Show contributing instructions if being installed in 'develop' mode
  103. if len(sys.argv) > 1 and sys.argv[1] == 'develop':
  104. docs_url = 'https://django-oscar.readthedocs.io/en/latest/internals/contributing/index.html'
  105. mailing_list = 'django-oscar@googlegroups.com'
  106. mailing_list_url = 'https://groups.google.com/forum/?fromgroups#!forum/django-oscar'
  107. twitter_url = 'https://twitter.com/django_oscar'
  108. msg = (
  109. "You're installing Oscar in 'develop' mode so I presume you're thinking\n"
  110. "of contributing:\n\n"
  111. "(a) That's brilliant - thank you for your time\n"
  112. "(b) If you have any questions, please use the mailing list:\n %s\n"
  113. " %s\n"
  114. "(c) There are more detailed contributing guidelines that you should "
  115. "have a look at:\n %s\n"
  116. "(d) Consider following @django_oscar on Twitter to stay up-to-date\n"
  117. " %s\n\nHappy hacking!") % (mailing_list, mailing_list_url,
  118. docs_url, twitter_url)
  119. line = '=' * 82
  120. print(("\n%s\n%s\n%s" % (line, msg, line)))