setup.py 2.8 KB

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