@@ -15,7 +15,7 @@ import (
1515)
1616
1717const pipConf = `[global]
18- index-url = %s
18+ index-url = https://%s/simple/
1919trusted-host = %s`
2020
2121type PipdeptreeStruct struct {
@@ -101,7 +101,7 @@ func pipreqs(dir string, projectPath, savePath string, logger *zap.SugaredLogger
101101 logger .Debug (zap .String ("pipreqs Path" , dir ))
102102 logger .Debug (zap .String ("pipreqs projectPath" , projectPath ))
103103 logger .Debug (zap .String ("pipreqs savepath" , savePath ))
104- cmd := exec .Command ("./pipreqs" , projectPath , "--savepath" , savePath , "--encoding=utf-8" , "--ignore=virtual_venv" )
104+ cmd := exec .Command ("./pipreqs" , projectPath , "--savepath" , savePath , "--encoding=utf-8" , "--ignore=virtual_venv" , "--pypi-server=https://pypi.tuna.tsinghua.edu.cn/pypi" )
105105 cmd .Dir = dir
106106 stdout , err := cmd .StdoutPipe ()
107107 if err != nil {
@@ -259,7 +259,7 @@ func directDependenceSurvival(mod *[]model.DependencyItem, nvMp map[string]strin
259259 exist [i .CompName ] = i .CompVersion
260260 }
261261 for k , v := range nvMp {
262- if _ , ok := exist [k ]; ! ok {
262+ if _ , ok := exist [k ]; ! ok && k != "pip" && k != "pipreqs" && k != "pipdeptree" {
263263 * mod = append (* mod , model.DependencyItem {
264264 Component : model.Component {
265265 CompName : k ,
0 commit comments