1
0

setup.py 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import os
  2. from functools import reduce
  3. from setuptools import setup
  4. from setuptools import find_namespace_packages
  5. here = os.path.abspath(os.path.dirname(__file__))
  6. about = {}
  7. with open(os.path.join(here, 'pywebio', '__version__.py'), encoding='utf8') as f:
  8. exec(f.read(), about)
  9. with open('README.md', encoding='utf8') as f:
  10. readme = f.read()
  11. extras_require = {
  12. 'flask': ['flask>=0.10'],
  13. 'django': ['django>=2.2'],
  14. 'aiohttp': ['aiohttp>=3.1'],
  15. 'bokeh': ['bokeh'],
  16. 'doc': ['sphinx', 'sphinx-tabs'],
  17. }
  18. # 可以使用 pip install pywebio[all] 安装所有额外依赖
  19. extras_require['all'] = reduce(lambda x, y: x + y, extras_require.values())
  20. setup(
  21. name=about['__package__'],
  22. version=about['__version__'],
  23. description=about['__description__'],
  24. long_description=readme,
  25. long_description_content_type='text/markdown',
  26. author=about['__author__'],
  27. author_email=about['__author_email__'],
  28. url=about['__url__'],
  29. license=about['__license__'],
  30. python_requires=">=3.5.2",
  31. packages=['pywebio', 'pywebio.session', 'pywebio.platform', 'pywebio.platform.adaptor'],
  32. scripts=['tools/pywebio-path-deploy'],
  33. package_data={
  34. # data files need to be listed both here (which determines what gets
  35. # installed) and in MANIFEST.in (which determines what gets included
  36. # in the sdist tarball)
  37. "pywebio": [
  38. "html/codemirror/active-line.js",
  39. "html/codemirror/matchbrackets.js",
  40. "html/codemirror/loadmode.js",
  41. "html/codemirror/autorefresh.js",
  42. "html/codemirror/addons.js",
  43. "html/codemirror/python.js",
  44. "html/css/markdown.min.css",
  45. "html/css/toastify.min.css",
  46. "html/css/app.css",
  47. "html/css/codemirror.min.css",
  48. "html/css/bootstrap-select.min.css",
  49. "html/css/bs-theme/default.min.css",
  50. "html/css/bs-theme/minty.min.css",
  51. "html/css/bs-theme/yeti.min.css",
  52. "html/css/bs-theme/dark.min.css",
  53. "html/css/bs-theme/sketchy.min.css",
  54. "html/js/FileSaver.min.js",
  55. "html/js/prism.min.js",
  56. "html/js/purify.min.js",
  57. "html/js/pywebio.min.js",
  58. "html/js/pywebio.min.js.map", # only available in dev version
  59. "html/js/mustache.min.js",
  60. "html/js/jquery.min.js",
  61. "html/js/bootstrap.min.js",
  62. "html/js/bs-custom-file-input.min.js",
  63. "html/js/popper.min.js",
  64. "html/js/toastify.min.js",
  65. "html/js/require.min.js",
  66. "html/js/codemirror.min.js",
  67. "html/js/bootstrap-select.min.js",
  68. "html/image/favicon_open_16.png",
  69. "html/image/favicon_closed_32.png",
  70. "platform/tpl/index.html"
  71. ],
  72. },
  73. classifiers=[
  74. "Programming Language :: Python :: 3",
  75. "Programming Language :: Python :: 3.5",
  76. "Programming Language :: Python :: 3.6",
  77. "Programming Language :: Python :: 3.7",
  78. "Programming Language :: Python :: 3.8",
  79. ],
  80. install_requires=[
  81. 'tornado>=5.0',
  82. 'user-agents',
  83. ],
  84. extras_require=extras_require,
  85. project_urls={
  86. 'Documentation': 'https://pywebio.readthedocs.io',
  87. 'Source': 'https://github.com/wang0618/PyWebIO',
  88. },
  89. )