setup.py 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. 'dev': [
  13. 'selenium==3.*',
  14. 'percy-python-selenium',
  15. 'coverage',
  16. 'sphinx-tabs'
  17. ]
  18. }
  19. # 可以使用 pip install pywebio[all] 安装所有额外依赖
  20. extras_require['all'] = reduce(lambda x, y: x + y, extras_require.values())
  21. setup(
  22. name=about['__package__'],
  23. version=about['__version__'],
  24. description=about['__description__'],
  25. long_description=readme,
  26. long_description_content_type='text/markdown',
  27. author=about['__author__'],
  28. author_email=about['__author_email__'],
  29. url=about['__url__'],
  30. license=about['__license__'],
  31. python_requires=">=3.5.2",
  32. packages=find_packages(),
  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/base16-light.min.css",
  39. "html/codemirror/active-line.js",
  40. "html/codemirror/matchbrackets.js",
  41. "html/codemirror/loadmode.js",
  42. "html/codemirror/python.js",
  43. "html/css/bootstrap.min.css",
  44. "html/css/mditor.min.css",
  45. "html/css/jquery.toast.min.css",
  46. "html/css/mditor.min.css.map",
  47. "html/css/app.css",
  48. "html/css/codemirror.min.css",
  49. "html/js/FileSaver.min.js",
  50. "html/js/mditor.min.js",
  51. "html/js/.DS_Store",
  52. "html/js/codemirror.js",
  53. "html/js/pywebio.js",
  54. "html/js/mustache.min.js",
  55. "html/js/jquery.min.js",
  56. "html/js/bootstrap.min.js",
  57. "html/js/bs-custom-file-input.min.js",
  58. "html/js/popper.min.js",
  59. "html/js/jquery.toast.min.js",
  60. "html/js/require.min.js",
  61. "html/js/codemirror.min.js",
  62. "html/image/favicon_open_16.png",
  63. "html/image/favicon_closed_32.png",
  64. "html/index_cdn.html",
  65. "html/index.html",
  66. ],
  67. },
  68. classifiers=[
  69. "Programming Language :: Python :: 3",
  70. "Programming Language :: Python :: 3.5",
  71. "Programming Language :: Python :: 3.6",
  72. "Programming Language :: Python :: 3.7",
  73. "Programming Language :: Python :: 3.8",
  74. ],
  75. install_requires=[
  76. 'tornado>=4.3.0', # After this version, the new async/await keywords in Python 3.5 are supported
  77. ],
  78. extras_require=extras_require,
  79. project_urls={
  80. 'Documentation': 'https://pywebio.readthedocs.io',
  81. 'Source': 'https://github.com/wang0618/PyWebIO',
  82. },
  83. )