好吧,这是个解决办法,但显然你可以用
npm
如果你安装了它。我创建了一个文件
package.json
在python应用程序的根目录中。
{
"name": "fff-connectors",
"version": "1.0.0",
"description": "fff project to UC Davis",
"directories": {
"test": "tests"
},
"scripts": {
"install": "pip install -r requirements.txt",
"test": "python -m unittest discover -v"
},
"keywords": [],
"author": "Leo Qiu",
"license": "ISC"
}
那我就用
npm install
或
yarn install
安装所有依赖项,以及
yarn test
或
npm test
运行测试脚本。
你也可以
preinstall
和
postinstall
钩子。例如,您可能需要删除文件或创建文件夹结构。
另一个好处是此设置允许您使用任何npm库,如
concurrently
,以便可以同时运行多个文件等。