-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildext.py
23 lines (20 loc) · 865 Bytes
/
buildext.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from distutils.core import setup, Extension
from glob import glob
from os.path import dirname, realpath
import numpy as np
sources = [x for x in glob(dirname(realpath(__file__)) + '/src/*.c', recursive=True)
if not x.endswith('main.c')]
py_sources = glob(dirname(realpath(__file__)) + '/python/*.c')
extras = ['-Wall', '-Wextra', '-Wconversion', '-Wno-unused-variable',
'-Wno-unused', '-pedantic', '-Wmissing-prototypes',
'-Wstrict-prototypes', '-O3']
module = Extension('qop', sources=sources + py_sources,
include_dirs=[
np.get_include(),
dirname(realpath(__file__))
],
extra_compile_args=extras)
setup(name='qop',
version='1.0',
description='A variational quantum circuit simulator.',
ext_modules=[module])