diff --git a/README-en.md b/README-en.md index 62d0da6..4b69fbe 100644 --- a/README-en.md +++ b/README-en.md @@ -72,8 +72,11 @@ xanalyzer -u "https://www.baidu.com/s?wd=hello" git clone https://github.com/qux-bbb/xanalyzer cd xanalyzer virtualenv venv +# use venv in windws: .\venv\Scripts\activate +# use venv in linux: source venv/bin/activate pip install -r requirements.txt python setup.py develop +# exit venv: deactivate ``` Then you can develop and debug with pycharm or vscode diff --git a/README.md b/README.md index 4c69c1f..ec9404d 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,11 @@ xanalyzer -u "https://www.baidu.com/s?wd=hello" git clone https://github.com/qux-bbb/xanalyzer cd xanalyzer virtualenv venv +# windws使用虚拟环境: .\venv\Scripts\activate +# linux使用虚拟环境: source venv/bin/activate pip install -r requirements.txt python setup.py develop +# 退出虚拟环境: deactivate ``` 这样之后就可以用pycharm或vscode开发调试了 @@ -82,10 +85,14 @@ python setup.py develop 打包前确保版本号和CHANGELOG.md已更新,清空dist文件夹 -安装依赖并打包: +安装依赖、通过测试项、打包: ```r +# windws使用虚拟环境: .\venv\Scripts\activate +# linux使用虚拟环境: source venv/bin/activate pip install -r requirements.my.txt +pytest python setup.py sdist bdist_wheel +# 退出虚拟环境: deactivate ``` 重新打开一个命令行,转到dist文件夹下本地安装,检查基本功能,举例: diff --git a/requirements.my.txt b/requirements.my.txt index 7ad0872..3bad55c 100644 --- a/requirements.my.txt +++ b/requirements.my.txt @@ -1,3 +1,4 @@ +pytest==7.3.1 setuptools==65.5.1 wheel==0.38.1 twine==3.8.0 \ No newline at end of file