将python包/文件打包到brython_modules.js中
brython-pack的Python项目详细描述
简介
brython pack将您的python包/文件打包到brython\u modules.js中。输出是 当前目录。它用于打包pyecharts.js
安装
您可以通过pip:
$ pip install brython-pack
或者克隆并安装:
$ git clone https://github.com/chfw/brython-pack.git
$ cd brython-pack
$ python setup.py install
限制
它不能收集内置python模块上的包依赖项(对brython_stdlib.js的依赖项) 为你。您需要自己解决这个问题并将其保存在requirements.txt文件中。 一旦你有了依赖列表,包装步骤就直接向前了。
用法
usage: bp brython_stdlib.js requirements.txt your packages and file list where: brython_stdlib.js: should be the accessible path to the lib file. requirements.txt: is the hard coded and manually worked out dependencies on brython_stdlib.txt. Not the pip requirements.txt. your packages file list: could be given as space separated arguments. examples: bp dependencies/brython_stdlib.js requirements.txt pyecharts editor.py
如果您想知道requirements.txt文件是什么样子的,下面是一个示例 requirement.txt