Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

setup.py 4.5KB

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