Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

setup.py 4.2KB

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