1
# Last Change: Tue Nov 13 11:00 PM 2007 J
6
__builtin__.__NUMPY_SETUP__ = True
8
from numpy.distutils.misc_util import get_numpy_include_dirs, get_mathlibs
9
from numscons import GetNumpyEnvironment, scons_get_paths, \
12
def CheckWincrypt(context):
13
from copy import deepcopy
15
/* check to see if _WIN32 is defined */
16
int main(int argc, char *argv[])
26
context.Message("Checking if using wincrypt ... ")
27
st = context.env.TryRun(src, '.C')
34
env = GetNumpyEnvironment(ARGUMENTS)
35
env.Append(CPPPATH = scons_get_paths(env['include_bootstrap']))
37
mlib = scons_get_mathlib(env)
38
env.AppendUnique(LIBS = mlib)
40
# On windows, see if we should use Advapi32
42
config = env.NumpyConfigure(custom_tests = {'CheckWincrypt' : CheckWincrypt})
43
if config.CheckWincrypt:
44
config.env.AppendUnique(LIBS = 'Advapi32')
46
sources = [os.path.join('mtrand', x) for x in
47
['mtrand.c', 'randomkit.c', 'initarray.c', 'distributions.c']]
49
# XXX: Pyrex dependency
50
mtrand = env.NumpyPythonExtension('mtrand', source = sources)