setup.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. import os
  2. from functools import reduce
  3. from setuptools import setup, find_packages
  4. here = os.path.abspath(os.path.dirname(__file__))
  5. about = {}
  6. with open(os.path.join(here, 'pywebio', '__version__.py')) as f:
  7. exec(f.read(), about)
  8. with open('README.md') as f:
  9. readme = f.read()
  10. extras_require = {
  11. 'flask': ['flask'],
  12. 'django': ['django'],
  13. 'dev': [
  14. 'selenium==3.*',
  15. 'percy-python-selenium',
  16. 'coverage',
  17. 'sphinx-tabs'
  18. ]
  19. }
  20. # 可以使用 pip install pywebio[all] 安装所有额外依赖
  21. extras_require['all'] = reduce(lambda x, y: x + y, extras_require.values())
  22. setup(
  23. name=about['__package__'],
  24. version=about['__version__'],
  25. description=about['__description__'],
  26. long_description=readme,
  27. long_description_content_type='text/markdown',
  28. author=about['__author__'],
  29. author_email=about['__author_email__'],
  30. url=about['__url__'],
  31. license=about['__license__'],
  32. python_requires=">=3.5.2",
  33. packages=find_packages(),
  34. package_data={
  35. # data files need to be listed both here (which determines what gets
  36. # installed) and in MANIFEST.in (which determines what gets included
  37. # in the sdist tarball)
  38. "pywebio": [
  39. "html/codemirror/base16-light.min.css",
  40. "html/codemirror/active-line.js",
  41. "html/codemirror/matchbrackets.js",
  42. "html/codemirror/loadmode.js",
  43. "html/codemirror/python.js",
  44. "html/css/bootstrap.min.css",
  45. "html/css/mditor.min.css",
  46. "html/css/jquery.toast.min.css",
  47. "html/css/mditor.min.css.map",
  48. "html/css/app.css",
  49. "html/css/codemirror.min.css",
  50. "html/js/FileSaver.min.js",
  51. "html/js/mditor.min.js",
  52. "html/js/.DS_Store",
  53. "html/js/codemirror.js",
  54. "html/js/pywebio.js",
  55. "html/js/mustache.min.js",
  56. "html/js/jquery.min.js",
  57. "html/js/bootstrap.min.js",
  58. "html/js/bs-custom-file-input.min.js",
  59. "html/js/popper.min.js",
  60. "html/js/jquery.toast.min.js",
  61. "html/js/require.min.js",
  62. "html/js/codemirror.min.js",
  63. "html/image/favicon_open_16.png",
  64. "html/image/favicon_closed_32.png",
  65. "html/index_cdn.html",
  66. "html/index.html",
  67. ],
  68. },
  69. classifiers=[
  70. "Programming Language :: Python :: 3",
  71. "Programming Language :: Python :: 3.5",
  72. "Programming Language :: Python :: 3.6",
  73. "Programming Language :: Python :: 3.7",
  74. "Programming Language :: Python :: 3.8",
  75. ],
  76. install_requires=[
  77. 'tornado>=4.3.0', # After this version, the new async/await keywords in Python 3.5 are supported
  78. ],
  79. extras_require=extras_require,
  80. project_urls={
  81. 'Documentation': 'https://pywebio.readthedocs.io',
  82. 'Source': 'https://github.com/wang0618/PyWebIO',
  83. },
  84. )