diff --git a/python/MANIFEST.in b/python/MANIFEST.in new file mode 100644 index 000000000..150d74bdc --- /dev/null +++ b/python/MANIFEST.in @@ -0,0 +1 @@ +graft src \ No newline at end of file diff --git a/python/setup.py b/python/setup.py index 3e694be44..61c1d166c 100644 --- a/python/setup.py +++ b/python/setup.py @@ -82,19 +82,19 @@ class CMakeBuild(build_ext): self.distribution.get_version()) if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) - sourcedir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + sourcedir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')) subprocess.check_call(['cmake', sourcedir] + cmake_args, cwd=self.build_temp, env=env) subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) find_llvm() -directories = [x[0] for x in os.walk(os.path.join(os.path.pardir, 'include'))] +directories = [x[0] for x in os.walk(os.path.join('src', 'include'))] data = [] for d in directories: for htype in ['h', 'hpp']: files = glob.glob(os.path.join(d, f'*.{htype}'), recursive=False) - data += [os.path.relpath(f, os.path.pardir) for f in files] + data += [os.path.relpath(f, 'src') for f in files] setup( name='triton', diff --git a/python/src/CMakeLists.txt b/python/src/CMakeLists.txt new file mode 120000 index 000000000..8c50e0213 --- /dev/null +++ b/python/src/CMakeLists.txt @@ -0,0 +1 @@ +../../CMakeLists.txt \ No newline at end of file diff --git a/python/src/cmake b/python/src/cmake new file mode 120000 index 000000000..c06bb027c --- /dev/null +++ b/python/src/cmake @@ -0,0 +1 @@ +../../cmake/ \ No newline at end of file diff --git a/python/src/include b/python/src/include new file mode 120000 index 000000000..3611dd266 --- /dev/null +++ b/python/src/include @@ -0,0 +1 @@ +../../include/ \ No newline at end of file diff --git a/python/src/lib b/python/src/lib new file mode 120000 index 000000000..bc1a1ee04 --- /dev/null +++ b/python/src/lib @@ -0,0 +1 @@ +../../lib/ \ No newline at end of file