Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

源码安装与二次开发 #105

Open
zlcting opened this issue May 17, 2019 · 2 comments
Open

源码安装与二次开发 #105

zlcting opened this issue May 17, 2019 · 2 comments

Comments

@zlcting
Copy link

zlcting commented May 17, 2019

我是个py新手
我想使用spiderkeeper 自己增加一下功能,请问我该怎样才能使源码跑起来。而不是使用
pip安装

@peniridis
Copy link

一种方法是修改完源码后使用Python setup.py install 重新安装,使新增模块生效
另一种比较麻烦,因为代码中模块引用路径都是使用site-packages包管理下spiderkeeper,所以flask无法启动当前目录应用,需要调整代码模块引用路径
例如:
from SpiderKeeper.app import db, api, agent, app
from app import db, api, agent, app

@zlcting
Copy link
Author

zlcting commented May 17, 2019

第一种方法我明白了,
第二种方法是不是把代码里面from SpiderKeeper.app import db, api, agent, app 这种引用 改成
from app import db, api, agent, app 这样呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants