forked from FALCONN-LIB/FFHT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
46 lines (39 loc) · 1.46 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import sys
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
try:
from setuptools import setup, find_packages, Extension
except ImportError:
sys.stderr.write('Setuptools not found!\n')
raise
try:
import numpy as np
except ImportError:
sys.stderr.write('NumPy not found!\n')
raise
if sys.version_info[0] == 2:
arr_sources = ['_ffht_2.c', 'fht.c']
if sys.version_info[0] == 3:
arr_sources = ['_ffht_3.c', 'fht.c']
module = Extension('ffht',
sources= arr_sources,
extra_compile_args=['-march=native', '-O3', '-Wall', '-Wextra', '-pedantic',
'-Wshadow', '-Wpointer-arith', '-Wcast-qual',
'-Wstrict-prototypes', '-Wmissing-prototypes',
'-std=c99', '-DFHT_HEADER_ONLY'],
include_dirs=[np.get_include()])
setup(name='FFHT',
version='1.1',
author='Ilya Razenshteyn, Ludwig Schmidt',
author_email='[email protected]',
url='https://github.com/FALCONN-LIB/FFHT',
description='Fast implementation of the Fast Hadamard Transform (FHT)',
long_description=long_description,
license='MIT',
keywords='fast Fourier Hadamard transform butterfly',
packages=find_packages(),
include_package_data=True,
ext_modules=[module])