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 3.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. from oscar import get_version
  12. PROJECT_DIR = os.path.dirname(__file__)
  13. # Change to the current directory to solve an issue installing Oscar on the
  14. # Vagrant machine.
  15. if PROJECT_DIR:
  16. os.chdir(PROJECT_DIR)
  17. setup(name='django-oscar',
  18. version=get_version().replace(' ', '-'),
  19. url='https://github.com/tangentlabs/django-oscar',
  20. author="David Winterbottom",
  21. author_email="david.winterbottom@tangentlabs.co.uk",
  22. description="A domain-driven e-commerce framework for Django",
  23. long_description=open(os.path.join(PROJECT_DIR, 'README.rst')).read(),
  24. keywords="E-commerce, Django, domain-driven",
  25. license='BSD',
  26. platforms=['linux'],
  27. packages=find_packages(exclude=["sandbox*", "tests*"]),
  28. include_package_data=True,
  29. install_requires=[
  30. 'django>=1.4,<1.5',
  31. # PIL is required for image fields, Pillow is the "friendly" PIL fork
  32. 'pillow>=1.7.8,<2.0.0',
  33. # Oscar ships with migraations
  34. 'South>=0.7.6,<0.8',
  35. # We use the ModelFormSetView from django-extra-views for the basket
  36. # page
  37. 'django-extra-views>=0.2,<0.6',
  38. # We ship a simple Haystack implementation (that needs to be
  39. # improved). We are using the 2.0-beta release from Github and
  40. # eagerly anticipating a stable 2.0 release on PyPI.
  41. 'django-haystack==2.0.0-beta',
  42. # Treebeard is used for categories
  43. 'django-treebeard>=1.61,<1.62',
  44. # Sorl is used as the default thumbnailer
  45. 'sorl-thumbnail==11.12',
  46. 'python-memcached>=1.48,<1.49',
  47. # Babel is used for currency formatting
  48. 'Babel>=0.9,<0.10',
  49. # Oscar's default templates use compressor (but you can override
  50. # this)
  51. 'django-compressor>=1.2,<1.4',
  52. # For converting non-ASCII to ASCII when creating slugs
  53. 'Unidecode>=0.04.12,<0.05',
  54. ],
  55. dependency_links=['https://github.com/toastdriven/django-haystack/tarball/fd83d3f449c2197f93040bb3d7bc6083ea8e48b7#egg=django-haystack-2.0.0-beta'],
  56. # See http://pypi.python.org/pypi?%3Aaction=list_classifiers
  57. classifiers=[
  58. 'Development Status :: 4 - Beta',
  59. 'Environment :: Web Environment',
  60. 'Framework :: Django',
  61. 'Intended Audience :: Developers',
  62. 'License :: OSI Approved :: BSD License',
  63. 'Operating System :: Unix',
  64. 'Programming Language :: Python',
  65. 'Topic :: Other/Nonlisted Topic']
  66. )
  67. # Show contributing instructions if being installed in 'develop' mode
  68. if len(sys.argv) > 1 and sys.argv[1] == 'develop':
  69. docs_url = 'http://django-oscar.readthedocs.org/en/latest/internals/contributing/index.html'
  70. mailing_list = 'django-oscar@googlegroups.com'
  71. mailing_list_url = 'https://groups.google.com/forum/?fromgroups#!forum/django-oscar'
  72. twitter_url = 'https://twitter.com/django_oscar'
  73. msg = (
  74. "You're installing Oscar in 'develop' mode so I presume you're thinking\n"
  75. "of contributing:\n\n"
  76. "(a) That's brilliant - thank you for your time\n"
  77. "(b) If you have any questions, please use the mailing list:\n %s\n"
  78. " %s\n"
  79. "(c) There are more detailed contributing guidelines that you should "
  80. "have a look at:\n %s\n"
  81. "(d) Consider following @django_oscar on Twitter to stay up-to-date\n"
  82. " %s\n\nHappy hacking!") % (mailing_list, mailing_list_url,
  83. docs_url, twitter_url)
  84. line = '=' * 82
  85. print "\n%s\n%s\n%s" % (line, msg, line)