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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 __future__ import print_function
  9. from setuptools import setup, find_packages
  10. import os
  11. import sys
  12. from oscar import get_version
  13. PROJECT_DIR = os.path.dirname(__file__)
  14. PY3 = sys.version_info >= (3, 0)
  15. # Change to the current directory to solve an issue installing Oscar on the
  16. # Vagrant machine.
  17. if PROJECT_DIR:
  18. os.chdir(PROJECT_DIR)
  19. setup(name='django-oscar',
  20. version=get_version().replace(' ', '-'),
  21. url='https://github.com/tangentlabs/django-oscar',
  22. author="David Winterbottom",
  23. author_email="david.winterbottom@tangentlabs.co.uk",
  24. description="A domain-driven e-commerce framework for Django",
  25. long_description=open(os.path.join(PROJECT_DIR, 'README.rst')).read(),
  26. keywords="E-commerce, Django, domain-driven",
  27. license='BSD',
  28. platforms=['linux'],
  29. packages=find_packages(exclude=["sandbox*", "tests*"]),
  30. include_package_data=True,
  31. install_requires=[
  32. 'django>=1.6.5,<1.8',
  33. # PIL is required for image fields, Pillow is the "friendly" PIL fork
  34. 'pillow>=1.7.8,<2.5',
  35. # Oscar ships with migrations
  36. 'South>=1.0,<1.1',
  37. # We use the ModelFormSetView from django-extra-views for the basket
  38. # page
  39. 'django-extra-views>=0.2,<0.7',
  40. # Search support
  41. 'django-haystack>=2.1.0',
  42. # Treebeard is used for categories
  43. 'django-treebeard==2.0',
  44. # Sorl is used as the default thumbnailer
  45. 'sorl-thumbnail==11.12.1b',
  46. # Babel is used for currency formatting
  47. 'Babel>=1.0,<1.4',
  48. # Oscar's default templates use compressor (but you can override
  49. # this)
  50. 'django-compressor==1.4',
  51. # For converting non-ASCII to ASCII when creating slugs
  52. 'Unidecode>=0.04.12,<0.05',
  53. # For manipulating search URLs
  54. 'purl>=0.7',
  55. # For phone number field
  56. 'phonenumbers>=5.9.2,<=6.0.0a',
  57. # Python 2 & 3 compatibility helper
  58. 'six>=1.5.2',
  59. ],
  60. # See http://pypi.python.org/pypi?%3Aaction=list_classifiers
  61. classifiers=[
  62. 'Development Status :: 4 - Beta',
  63. 'Environment :: Web Environment',
  64. 'Framework :: Django',
  65. 'Intended Audience :: Developers',
  66. 'License :: OSI Approved :: BSD License',
  67. 'Operating System :: Unix',
  68. 'Programming Language :: Python',
  69. 'Programming Language :: Python :: 2',
  70. 'Programming Language :: Python :: 2.7',
  71. 'Programming Language :: Python :: 3',
  72. 'Programming Language :: Python :: 3.3',
  73. 'Programming Language :: Python :: 3.4',
  74. 'Topic :: Software Development :: Libraries :: Application Frameworks']
  75. )
  76. # Show contributing instructions if being installed in 'develop' mode
  77. if len(sys.argv) > 1 and sys.argv[1] == 'develop':
  78. docs_url = 'http://django-oscar.readthedocs.org/en/latest/internals/contributing/index.html'
  79. mailing_list = 'django-oscar@googlegroups.com'
  80. mailing_list_url = 'https://groups.google.com/forum/?fromgroups#!forum/django-oscar'
  81. twitter_url = 'https://twitter.com/django_oscar'
  82. msg = (
  83. "You're installing Oscar in 'develop' mode so I presume you're thinking\n"
  84. "of contributing:\n\n"
  85. "(a) That's brilliant - thank you for your time\n"
  86. "(b) If you have any questions, please use the mailing list:\n %s\n"
  87. " %s\n"
  88. "(c) There are more detailed contributing guidelines that you should "
  89. "have a look at:\n %s\n"
  90. "(d) Consider following @django_oscar on Twitter to stay up-to-date\n"
  91. " %s\n\nHappy hacking!") % (mailing_list, mailing_list_url,
  92. docs_url, twitter_url)
  93. line = '=' * 82
  94. print(("\n%s\n%s\n%s" % (line, msg, line)))