-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
22 lines (18 loc) · 833 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
import numpy as np
from setuptools import Extension, setup
source_dir = 'src/pocky/ext'
include_dir = os.path.join(source_dir, 'include')
source_files = ['pocky.c', 'pocky_bufpair.c', 'pocky_context.c',
'pocky_functions.c', 'pocky_helpers.c', 'pocky_utils.c']
source_files = [os.path.join(source_dir, fname) for fname in source_files]
header_files = ['pocky.h', 'pocky_bufpair.h', 'pocky_context.h',
'pocky_functions.h', 'pocky_helpers.h', 'pocky_utils.h',
'pocky_api.h']
header_files = [os.path.join(include_dir, fname) for fname in header_files]
ext_modules = [
Extension(name='pocky.ext', sources=source_files, libraries=['OpenCL'],
language='c', include_dirs=[include_dir, np.get_include()],
depends=header_files)
]
setup(ext_modules=ext_modules)