MCPcopy Create free account
hub / github.com/modelscope/ms-agent / parse_require_file

Function parse_require_file

setup.py:81–98  ·  view source on GitHub ↗
(fpath)

Source from the content-addressed store, hash-verified

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

Callers 2

parse_lineFunction · 0.85
gen_packages_itemsFunction · 0.85

Calls 1

parse_lineFunction · 0.85

Tested by

no test coverage detected