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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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: python setup.py sdist upload
  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
  15. setup(name='django-oscar',
  16. version=get_version().replace(' ', '-'),
  17. url='https://github.com/django-oscar/django-oscar',
  18. author="David Winterbottom",
  19. author_email="david.winterbottom@gmail.com",
  20. description="A domain-driven e-commerce framework for Django",
  21. long_description=open(os.path.join(PROJECT_DIR, 'README.rst')).read(),
  22. keywords="E-commerce, Django, domain-driven",
  23. license='BSD',
  24. platforms=['linux'],
  25. package_dir={'': 'src'},
  26. packages=find_packages('src'),
  27. include_package_data=True,
  28. install_requires=[
  29. 'django>=1.7.8,<1.9',
  30. # PIL is required for image fields, Pillow is the "friendly" PIL fork
  31. 'pillow>=1.7.8,<=2.7',
  32. # We use the ModelFormSetView from django-extra-views for the basket
  33. # page. 0.6.5 pins version of six, which causes issues:
  34. # https://github.com/AndrewIngram/django-extra-views/pull/85
  35. 'django-extra-views>=0.2,<0.6.5',
  36. # Search support
  37. 'django-haystack>=2.3.1,<2.4.0',
  38. # Treebeard is used for categories
  39. 'django-treebeard>=3.0',
  40. # Sorl is used as the default thumbnailer
  41. 'sorl-thumbnail>=11.12.1b,<=12.2',
  42. # Babel is used for currency formatting
  43. 'Babel>=1.0,<1.4',
  44. # Oscar's default templates use compressor (but you can override
  45. # this)
  46. 'django-compressor>=1.4',
  47. # For converting non-ASCII to ASCII when creating slugs
  48. 'Unidecode>=0.04.12,<0.05',
  49. # For manipulating search URLs
  50. 'purl>=0.7',
  51. # For phone number field
  52. 'phonenumbers>=6.3.0,<7.0.0',
  53. # Used for oscar.test.contextmanagers.mock_signal_receiver
  54. 'mock>=1.0.1,<1.1',
  55. # Used for oscar.test.newfactories
  56. 'factory-boy>=2.4.1,<2.5',
  57. # Used for automatically building larger HTML tables
  58. 'django-tables2>=1.0.4,<1.1',
  59. # Used for manipulating form field attributes in templates (eg: add
  60. # a css class)
  61. 'django-widget-tweaks>=1.3,<1.4',
  62. ],
  63. dependency_links=[],
  64. # See http://pypi.python.org/pypi?%3Aaction=list_classifiers
  65. classifiers=[
  66. 'Development Status :: 5 - Production/Stable',
  67. 'Environment :: Web Environment',
  68. 'Framework :: Django',
  69. 'Framework :: Django :: 1.7',
  70. 'Framework :: Django :: 1.8',
  71. 'Intended Audience :: Developers',
  72. 'License :: OSI Approved :: BSD License',
  73. 'Operating System :: Unix',
  74. 'Programming Language :: Python',
  75. 'Programming Language :: Python :: 2',
  76. 'Programming Language :: Python :: 2.7',
  77. 'Programming Language :: Python :: 3',
  78. 'Programming Language :: Python :: 3.3',
  79. 'Programming Language :: Python :: 3.4',
  80. 'Topic :: Software Development :: Libraries :: Application Frameworks']
  81. )
  82. # Show contributing instructions if being installed in 'develop' mode
  83. if len(sys.argv) > 1 and sys.argv[1] == 'develop':
  84. docs_url = 'http://django-oscar.readthedocs.org/en/latest/internals/contributing/index.html'
  85. mailing_list = 'django-oscar@googlegroups.com'
  86. mailing_list_url = 'https://groups.google.com/forum/?fromgroups#!forum/django-oscar'
  87. twitter_url = 'https://twitter.com/django_oscar'
  88. msg = (
  89. "You're installing Oscar in 'develop' mode so I presume you're thinking\n"
  90. "of contributing:\n\n"
  91. "(a) That's brilliant - thank you for your time\n"
  92. "(b) If you have any questions, please use the mailing list:\n %s\n"
  93. " %s\n"
  94. "(c) There are more detailed contributing guidelines that you should "
  95. "have a look at:\n %s\n"
  96. "(d) Consider following @django_oscar on Twitter to stay up-to-date\n"
  97. " %s\n\nHappy hacking!") % (mailing_list, mailing_list_url,
  98. docs_url, twitter_url)
  99. line = '=' * 82
  100. print(("\n%s\n%s\n%s" % (line, msg, line)))