-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathsetup.py
30 lines (25 loc) · 1.27 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /usr/bin/env python
from wheel.bdist_wheel import bdist_wheel
from setuptools import setup, Extension
# Adapted from the cibuildwheel example https://github.com/joerick/python-ctypes-package-sample
# it marks the wheel as not specific to the Python API version.
class WheelABINone(bdist_wheel):
def finalize_options(self):
bdist_wheel.finalize_options(self)
self.root_is_pure = False
def get_tag(self):
_, _, plat = bdist_wheel.get_tag(self)
return "py3", "none", plat
setup(
ext_modules=[Extension('pyrtools.pyramids.c.wrapConv',
sources=['src/pyrtools/pyramids/c/py.c',
'src/pyrtools/pyramids/c/convolve.c',
'src/pyrtools/pyramids/c/edges.c',
'src/pyrtools/pyramids/c/wrap.c',
'src/pyrtools/pyramids/c/internal_pointOp.c'],
depends=['src/pyrtools/pyramids/c/meta.h',
'src/pyrtools/pyramids/c/convolve.h',
'src/pyrtools/pyramids/c/internal_pointOp.h'],
extra_compile_args=['-fPIC', '-shared'])],
cmdclass={"bdist_wheel": WheelABINone},
)