Skip to content

Commit bad9354

Browse files
authored
[bugfix]fix setup.py (#520)
* fix setup.py * add editable_wheel
1 parent 0fcae8d commit bad9354

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ def enable_sparse() -> bool:
4040

4141
def is_editable_mode() -> bool:
4242
commands = [arg.lower() for arg in sys.argv]
43-
return "develop" in commands or "--editable" in commands or "-e" in commands
43+
return (
44+
"develop" in commands
45+
or "--editable" in commands
46+
or "-e" in commands
47+
or "editable_wheel" in commands
48+
)
4449

4550

4651
class CMakeExtension(Extension):
@@ -60,7 +65,7 @@ def run(self):
6065
def build_cmake(self, ext: CMakeExtension):
6166
build_dir = os.path.abspath(self.build_temp)
6267
install_dir = os.path.abspath(self.build_lib)
63-
if is_editable_mode:
68+
if is_editable_mode():
6469
install_dir = ext.cmake_file_path
6570

6671
cmake_args = [

0 commit comments

Comments
 (0)