2025-02-02 14:58:18 -05:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2025-06-03 11:20:17 -07:00
|
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
2025-02-02 14:58:18 -05:00
|
|
|
|
2025-09-15 17:43:40 +01:00
|
|
|
import glob
|
|
|
|
|
|
2025-12-06 09:42:41 +00:00
|
|
|
for file in (*glob.glob("requirements/*.txt"), "pyproject.toml"):
|
2025-09-15 17:43:40 +01:00
|
|
|
print(f">>> cleaning {file}")
|
|
|
|
|
with open(file) as f:
|
|
|
|
|
lines = f.readlines()
|
|
|
|
|
if "torch" in "".join(lines).lower():
|
|
|
|
|
print("removed:")
|
|
|
|
|
with open(file, "w") as f:
|
|
|
|
|
for line in lines:
|
|
|
|
|
if "torch" not in line.lower():
|
|
|
|
|
f.write(line)
|
|
|
|
|
else:
|
|
|
|
|
print(line.strip())
|
2025-12-06 09:42:41 +00:00
|
|
|
print(f"<<< done cleaning {file}\n")
|