Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# SPDX-License-Identifier: Apache-2.0

import ctypes
import glob
import importlib.util
import json
import logging
import os
import re
import subprocess
import sys
import zipfile
from pathlib import Path
from shutil import which

Expand Down Expand Up @@ -271,12 +273,14 @@ def run(self):

# copy vllm/vllm_flash_attn/*.py from self.build_lib to current
# directory so that they can be included in the editable build
import glob
# but ignore __init__.py files
files = glob.glob(
os.path.join(self.build_lib, "vllm", "vllm_flash_attn", "*.py"))
for file in files:
dst_file = os.path.join("vllm/vllm_flash_attn",
os.path.basename(file))
# Skip __init__.py files
if (basename := os.path.basename(file)) == "__init__.py":
continue
dst_file = os.path.join("vllm/vllm_flash_attn", basename)
print(f"Copying {file} to {dst_file}")
self.copy_file(file, dst_file)

Expand Down Expand Up @@ -342,8 +346,6 @@ def run(self) -> None:
if not is_url_available(wheel_location):
wheel_location = "https://wheels.vllm.ai/nightly/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl"

import zipfile

if os.path.isfile(wheel_location):
wheel_path = wheel_location
print(f"Using existing wheel={wheel_path}")
Expand Down