Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

setup.py 4.2KB

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