-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
36 lines (32 loc) · 1.05 KB
/
Copy pathsetup.py
File metadata and controls
36 lines (32 loc) · 1.05 KB
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
import numbers
from xml.etree.ElementInclude import include
from setuptools import setup,Extension
from Cython.Build import cythonize
from Cython.Distutils import build_ext
from Cython.Compiler.Options import get_directive_defaults
import sys
import numpy
includes = sys.path
includes.append(numpy.get_include())
#directive_defaults = get_directive_defaults()
#directive_defaults['linetrace'] = True
#directive_defaults['binding'] = True
ext_modules = [ Extension(
# The cython file should always contain the same name as the extension module name.
"crypto_math",sources=[
"src/crypto_math.pyx",
],
language="c++",
include_dirs= includes,
libraries=['gmp', 'mpfr', 'mpc'],
#define_macros=[('CYTHON_TRACE', '1')]
),
]
setup(
name="crypto_math",
version="0.0.1",
ext_modules = cythonize(ext_modules, include_path=sys.path),
cmdclass={"build_ext": build_ext},
install_require = ["numpy", "gmpy2", "sympy", "pytest", "pytest-benchmark"],
#compiler_directives={'profile': True, 'linetrace': True, 'binding': True},
)