-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathuse_existing_metax.py
More file actions
30 lines (28 loc) · 993 Bytes
/
use_existing_metax.py
File metadata and controls
30 lines (28 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# SPDX-License-Identifier: Apache-2.0
# 2026 - Modified by MetaX Integrated Circuits (Shanghai) Co., Ltd. All Rights Reserved.
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import glob
requires_files = glob.glob("requirements/*.txt")
requires_files += ["pyproject.toml"]
for file in requires_files:
print(f">>> cleaning {file}")
with open(file) as f:
lines = f.readlines()
if (
"+metax" in "".join(lines).lower()
or "+maca" in "".join(lines).lower()
or "mcpy" in "".join(lines).lower()
):
print("removed:")
with open(file, "w") as f:
for line in lines:
if (
"+metax" not in line.lower()
and "+maca" not in line.lower()
and "mcpy" not in line.lower()
):
f.write(line)
else:
print(line.strip())
print(f"<<< done cleaning {file}")
print()