Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Apr 4, 2024
1 parent fb770cb commit 221ccb8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class CMakeExtension(Extension):
def __init__(self, name, sourcedir=''):
Extension.__init__(self, name, sources=[])
self.sourcedir = os.path.abspath(sourcedir)
self.sourcedir = osp.abspath(sourcedir)


class CMakeBuild(build_ext):
Expand All @@ -29,6 +29,7 @@ def check_env_flag(name: str, default: str = "") -> bool:
return value in ["1", "ON", "YES", "TRUE", "Y"]

def get_ext_filename(self, ext_name):
print("GET EXT FILENAME")
# Remove Python ABI suffix:
ext_filename = super().get_ext_filename(ext_name)
ext_filename_parts = ext_filename.split('.')
Expand All @@ -40,7 +41,7 @@ def build_extension(self, ext):

import torch

extdir = os.path.abspath(osp.dirname(self.get_ext_fullpath(ext.name)))
extdir = osp.abspath(osp.dirname(self.get_ext_fullpath(ext.name)))
self.build_type = "DEBUG" if self.debug else "RELEASE"
if self.debug is None:
if CMakeBuild.check_env_flag("DEBUG"):
Expand Down Expand Up @@ -79,10 +80,13 @@ def build_extension(self, ext):

build_args = []

print("1111 ---------------")
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args,
cwd=self.build_temp)
print("2222 ---------------")
subprocess.check_call(['cmake', '--build', '.'] + build_args,
cwd=self.build_temp)
print("3333 ---------------")


def maybe_append_with_mkl(dependencies):
Expand Down

0 comments on commit 221ccb8

Please sign in to comment.