MCPcopy
hub / github.com/modelscope/ms-swift / parse_require_file

Function parse_require_file

setup.py:78–94  ·  view source on GitHub ↗
(fpath)

Source from the content-addressed store, hash-verified

76 yield info
77
78 def parse_require_file(fpath):
79 with open(fpath, 'r', encoding='utf-8') as f:
80 for line in f.readlines():
81 line = line.strip()
82 if line.startswith('http'):
83 print('skip http requirements %s' % line)
84 continue
85 if line and not line.startswith('#') and not line.startswith('--'):
86 for info in parse_line(line):
87 yield info
88 elif line and line.startswith('--find-links'):
89 eles = line.split()
90 for e in eles:
91 e = e.strip()
92 if 'http' in e:
93 info = dict(dependency_links=e)
94 yield info
95
96 def gen_packages_items():
97 items = []

Callers 2

parse_lineFunction · 0.85
gen_packages_itemsFunction · 0.85

Calls 2

parse_lineFunction · 0.85
splitMethod · 0.80

Tested by

no test coverage detected