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.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. # 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/django-oscar/django-oscar',
  22. author="David Winterbottom",
  23. author_email="david.winterbottom@gmail.com",
  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. package_dir={'': 'src'},
  30. packages=find_packages('src'),
  31. include_package_data=True,
  32. install_requires=[
  33. 'django>=1.6.8,<1.8',
  34. # PIL is required for image fields, Pillow is the "friendly" PIL fork
  35. 'pillow>=1.7.8,<2.5',
  36. # We use the ModelFormSetView from django-extra-views for the basket
  37. # page. 0.6.5 pins version of six, which causes issues:
  38. # https://github.com/AndrewIngram/django-extra-views/pull/85
  39. 'django-extra-views>=0.2,<0.6.5',
  40. # Search support
  41. 'django-haystack>=2.3.1,<2.4.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>=6.3.0,<7.0.0',
  57. # Used for oscar.test.contextmanagers.mock_signal_receiver
  58. 'mock>=1.0.1,<1.1',
  59. # Used for oscar.test.newfactories
  60. 'factory-boy>=2.4.1,<2.5',
  61. # Used for automatically building larger HTML tables
  62. 'django-tables2>=0.15.0,<0.16',
  63. # Used for manipulating form field attributes in templates (eg: add
  64. # a css class)
  65. 'django-widget-tweaks>=1.3,<1.4',
  66. ],
  67. # See http://pypi.python.org/pypi?%3Aaction=list_classifiers
  68. classifiers=[
  69. 'Development Status :: 5 - Production/Stable',
  70. 'Environment :: Web Environment',
  71. 'Framework :: Django',
  72. 'Intended Audience :: Developers',
  73. 'License :: OSI Approved :: BSD License',
  74. 'Operating System :: Unix',
  75. 'Programming Language :: Python',
  76. 'Programming Language :: Python :: 2',
  77. 'Programming Language :: Python :: 2.7',
  78. 'Programming Language :: Python :: 3',
  79. 'Programming Language :: Python :: 3.3',
  80. 'Programming Language :: Python :: 3.4',
  81. 'Topic :: Software Development :: Libraries :: Application Frameworks']
  82. )
  83. # Show contributing instructions if being installed in 'develop' mode
  84. if len(sys.argv) > 1 and sys.argv[1] == 'develop':
  85. docs_url = 'http://django-oscar.readthedocs.org/en/latest/internals/contributing/index.html'
  86. mailing_list = 'django-oscar@googlegroups.com'
  87. mailing_list_url = 'https://groups.google.com/forum/?fromgroups#!forum/django-oscar'
  88. twitter_url = 'https://twitter.com/django_oscar'
  89. msg = (
  90. "You're installing Oscar in 'develop' mode so I presume you're thinking\n"
  91. "of contributing:\n\n"
  92. "(a) That's brilliant - thank you for your time\n"
  93. "(b) If you have any questions, please use the mailing list:\n %s\n"
  94. " %s\n"
  95. "(c) There are more detailed contributing guidelines that you should "
  96. "have a look at:\n %s\n"
  97. "(d) Consider following @django_oscar on Twitter to stay up-to-date\n"
  98. " %s\n\nHappy hacking!") % (mailing_list, mailing_list_url,
  99. docs_url, twitter_url)
  100. line = '=' * 82
  101. print(("\n%s\n%s\n%s" % (line, msg, line)))