Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

setup.py 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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: make release
  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 # noqa isort:skip
  15. install_requires = [
  16. 'django>=1.8.8,<1.11',
  17. # PIL is required for image fields, Pillow is the "friendly" PIL fork
  18. 'pillow>=3.4.2',
  19. # We use the ModelFormSetView from django-extra-views for the basket
  20. # page. > 0.6.5 has a bug which causes issues with Django > 1.6,
  21. # https://github.com/AndrewIngram/django-extra-views/issues/114
  22. 'django-extra-views>=0.2,<0.6.5',
  23. # Search support
  24. 'django-haystack>=2.5.0,<2.6.0',
  25. # Treebeard is used for categories
  26. 'django-treebeard>=4.1.0',
  27. # Sorl is used as the default thumbnailer
  28. 'sorl-thumbnail>=12.4a1',
  29. # Babel is used for currency formatting
  30. 'Babel>=1.0,<3.0',
  31. # For converting non-ASCII to ASCII when creating slugs
  32. 'Unidecode>=0.04.12,<0.05',
  33. # For manipulating search URLs
  34. 'purl>=0.7',
  35. # For phone number field
  36. 'phonenumbers>=6.3.0,<9.0.0',
  37. # Used for oscar.test.contextmanagers.mock_signal_receiver
  38. 'mock>=1.0.1,<3.0',
  39. # Used for oscar.test.newfactories
  40. 'factory-boy>=2.4.1,<3.0',
  41. # Used for automatically building larger HTML tables
  42. 'django-tables2>=1.0.4,<1.1',
  43. # Used for manipulating form field attributes in templates (eg: add
  44. # a css class)
  45. 'django-widget-tweaks>=1.4.1',
  46. ]
  47. docs_requires = [
  48. 'Sphinx==1.4.5',
  49. 'sphinxcontrib-napoleon==0.5.2',
  50. 'sphinx_rtd_theme==0.1.9',
  51. ]
  52. test_requires = [
  53. 'WebTest==2.0.23',
  54. 'coverage==4.3.4',
  55. 'django-webtest==1.8.0',
  56. 'py>=1.4.31',
  57. 'pytest==3.0.6',
  58. 'pytest-cov==2.4.0',
  59. 'pytest-django==3.1.2',
  60. 'pytest-xdist==1.15.0',
  61. 'pytest-warnings==0.2.0',
  62. 'tox==2.3.1',
  63. ]
  64. setup(
  65. name='django-oscar',
  66. version=get_version().replace(' ', '-'),
  67. url='https://github.com/django-oscar/django-oscar',
  68. author="David Winterbottom",
  69. author_email="david.winterbottom@gmail.com",
  70. description="A domain-driven e-commerce framework for Django",
  71. long_description=open(os.path.join(PROJECT_DIR, 'README.rst')).read(),
  72. keywords="E-commerce, Django, domain-driven",
  73. license='BSD',
  74. platforms=['linux'],
  75. package_dir={'': 'src'},
  76. packages=find_packages('src'),
  77. include_package_data=True,
  78. install_requires=install_requires,
  79. extras_require={
  80. 'docs': docs_requires,
  81. 'test': test_requires,
  82. },
  83. classifiers=[
  84. 'Development Status :: 5 - Production/Stable',
  85. 'Environment :: Web Environment',
  86. 'Framework :: Django',
  87. 'Framework :: Django :: 1.8',
  88. 'Framework :: Django :: 1.9',
  89. 'Intended Audience :: Developers',
  90. 'License :: OSI Approved :: BSD License',
  91. 'Operating System :: Unix',
  92. 'Programming Language :: Python',
  93. 'Programming Language :: Python :: 2',
  94. 'Programming Language :: Python :: 2.7',
  95. 'Programming Language :: Python :: 3',
  96. 'Programming Language :: Python :: 3.3',
  97. 'Programming Language :: Python :: 3.4',
  98. 'Programming Language :: Python :: 3.5',
  99. 'Topic :: Software Development :: Libraries :: Application Frameworks']
  100. )
  101. # Show contributing instructions if being installed in 'develop' mode
  102. if len(sys.argv) > 1 and sys.argv[1] == 'develop':
  103. docs_url = 'https://django-oscar.readthedocs.io/en/latest/internals/contributing/index.html'
  104. mailing_list = 'django-oscar@googlegroups.com'
  105. mailing_list_url = 'https://groups.google.com/forum/?fromgroups#!forum/django-oscar'
  106. twitter_url = 'https://twitter.com/django_oscar'
  107. msg = (
  108. "You're installing Oscar in 'develop' mode so I presume you're thinking\n"
  109. "of contributing:\n\n"
  110. "(a) That's brilliant - thank you for your time\n"
  111. "(b) If you have any questions, please use the mailing list:\n %s\n"
  112. " %s\n"
  113. "(c) There are more detailed contributing guidelines that you should "
  114. "have a look at:\n %s\n"
  115. "(d) Consider following @django_oscar on Twitter to stay up-to-date\n"
  116. " %s\n\nHappy hacking!") % (mailing_list, mailing_list_url,
  117. docs_url, twitter_url)
  118. line = '=' * 82
  119. print(("\n%s\n%s\n%s" % (line, msg, line)))