api-automation-test/ApiAutomationTest/export_package_info.bat

22 lines
1.1 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
rem encodig=GB2312
echo **********************************************************************
echo ***********************【导出Python环境包信息】***********************
set pip="%cd%\venv\Scripts\pip.exe"
set pipdeptree="%cd%\venv\Scripts\pipdeptree.exe"
rem echo %pip%
if exist %pip% (
echo ***********************【检测到项目目录下Python解释器】***************
echo # 项目目录下Python第三方package信息 > %cd%\package_info.txt
%pip% freeze >> %cd%\package_info.txt
echo # 项目目录下Python第三方package依赖树信息 > %cd%\package_deptree_info.txt
%pipdeptree% -a >> %cd%\package_deptree_info.txt
) else (
echo ***********************【未检测到项目目录下Python解释器使用系统环境变量目录下Python解释器】************
echo # 系统环境变量中Python第三方package信息 > %cd%\package_info.txt
pip freeze >> %cd%\package_info.txt
echo # 系统环境变量中Python第三方package依赖树信息 > %cd%\package_deptree_info.txt
pipdeptree -a >> %cd%\package_deptree_info.txt
)
echo ***********************【导出Python包信息完成】***********************
pause