Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixiong-tang committed May 25, 2024
1 parent 8f290b5 commit adfb0a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
18 changes: 16 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,22 @@
os.chdir('cubao_headers/include')
path = f'__init__.py'
Path(path).touch()
path = f'../__init__.py'
Path(path).touch()

lines = '''import os
DIR = os.path.abspath(os.path.dirname(__file__))
def get_include() -> str:
installed_path = os.path.join(DIR, "include")
source_path = os.path.join(os.path.dirname(DIR), "include")
return installed_path if os.path.exists(installed_path) else source_path
'''

with open('../__init__.py', 'w') as f:
f.write(lines)


packages = ['f"{name}"', 'f"{name}.include"']
prefix = ' '

Expand Down
9 changes: 0 additions & 9 deletions include/__init__.py

This file was deleted.

0 comments on commit adfb0a3

Please sign in to comment.