|
1 | 1 | import os |
2 | 2 | from functools import reduce |
3 | 3 |
|
4 | | -from setuptools import setup |
5 | | -from setuptools import find_namespace_packages |
| 4 | +from setuptools import setup, find_packages |
6 | 5 |
|
7 | 6 | here = os.path.abspath(os.path.dirname(__file__)) |
8 | 7 |
|
|
34 | 33 | url=about['__url__'], |
35 | 34 | license=about['__license__'], |
36 | 35 | python_requires=">=3.5.2", |
37 | | - packages=['pywebio', 'pywebio.session', 'pywebio.platform', 'pywebio.platform.adaptor'], |
| 36 | + packages=[p for p in find_packages() if p.startswith('pywebio')], |
38 | 37 | scripts=['tools/pywebio-path-deploy'], |
39 | 38 | package_data={ |
40 | 39 | # data files need to be listed both here (which determines what gets |
41 | 40 | # installed) and in MANIFEST.in (which determines what gets included |
42 | 41 | # in the sdist tarball) |
43 | 42 | "pywebio": [ |
44 | | - "html/codemirror/active-line.js", |
45 | | - "html/codemirror/matchbrackets.js", |
46 | | - "html/codemirror/loadmode.js", |
47 | | - "html/codemirror/autorefresh.js", |
48 | | - "html/codemirror/addons.js", |
49 | | - "html/codemirror/python.js", |
50 | | - "html/css/markdown.min.css", |
51 | | - "html/css/toastify.min.css", |
52 | | - "html/css/app.css", |
53 | | - "html/css/codemirror.min.css", |
54 | | - "html/css/bootstrap-select.min.css", |
55 | | - "html/css/bs-theme/default.min.css", |
56 | | - "html/css/bs-theme/minty.min.css", |
57 | | - "html/css/bs-theme/yeti.min.css", |
58 | | - "html/css/bs-theme/dark.min.css", |
59 | | - "html/css/bs-theme/sketchy.min.css", |
60 | | - "html/js/FileSaver.min.js", |
61 | | - "html/js/prism.min.js", |
62 | | - "html/js/purify.min.js", |
63 | | - "html/js/pywebio.min.js", |
64 | | - "html/js/pywebio.min.js.map", # only available in dev version |
65 | | - "html/js/mustache.min.js", |
66 | | - "html/js/jquery.min.js", |
67 | | - "html/js/bootstrap.min.js", |
68 | | - "html/js/bs-custom-file-input.min.js", |
69 | | - "html/js/popper.min.js", |
70 | | - "html/js/toastify.min.js", |
71 | | - "html/js/require.min.js", |
72 | | - "html/js/codemirror.min.js", |
73 | | - "html/js/bootstrap-select.min.js", |
74 | | - "html/image/favicon_open_16.png", |
75 | | - "html/image/favicon_closed_32.png", |
| 43 | + "html/**", |
76 | 44 | "platform/tpl/index.html" |
77 | 45 | ], |
78 | 46 | }, |
| 47 | + entry_points={ |
| 48 | + # pyinstaller hook |
| 49 | + # https://pyinstaller.org/en/stable/hooks.html#providing-pyinstaller-hooks-with-your-package |
| 50 | + 'pyinstaller40': [ |
| 51 | + 'hook-dirs = pywebio.platform.pyinstaller:get_hook_dirs', |
| 52 | + ] |
| 53 | + }, |
79 | 54 | classifiers=[ |
80 | 55 | "Programming Language :: Python :: 3", |
81 | 56 | "Programming Language :: Python :: 3.5", |
|
0 commit comments