~jtaylor/ubuntu/precise/python-numpy/multiarch-fix-818867

« back to all changes in this revision

Viewing changes to numpy/random/SConstruct

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik, Riku Voipio, Tiziano Zito, Carlos Galisteo, Ondrej Certik
  • Date: 2008-07-08 15:08:16 UTC
  • mfrom: (0.1.21 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080708150816-ekf992jcp2k1eua3
Tags: 1:1.1.0-3
[ Riku Voipio ]
* debian/control: atlas is not available on armel, and after a quick look
  neither on alpha. I'd also suggest dropping
  libatlas-sse-dev|libatlas-sse2-dev|libatlas-3dnow-dev alternative combo
  away, these are potentially dangerous on buildd's. Ondrej: dropped.
  (Closes: #489568)

[ Tiziano Zito ]
* patch: build _dotblas.c when ATLAS is not installed, build-conflict with
  atlas, build-depend on blas+lapack only, as it used to be (Closes: #489726)

[ Carlos Galisteo ]
* debian/control
  - Added Homepage field.

[ Ondrej Certik ]
* Checked the package on i386 and amd64, both with and without atlas, all
  tests run and the numpy package is faster if atlas is around. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Last Change: Tue Nov 13 11:00 PM 2007 J
 
2
# vim:syntax=python
 
3
import os
 
4
 
 
5
import __builtin__
 
6
__builtin__.__NUMPY_SETUP__ = True
 
7
 
 
8
from numpy.distutils.misc_util import get_numpy_include_dirs, get_mathlibs
 
9
from numscons import GetNumpyEnvironment, scons_get_paths, \
 
10
                                  scons_get_mathlib
 
11
 
 
12
def CheckWincrypt(context):
 
13
    from copy import deepcopy
 
14
    src = """\
 
15
/* check to see if _WIN32 is defined */
 
16
int main(int argc, char *argv[])
 
17
{
 
18
#ifdef _WIN32
 
19
    return 0;
 
20
#else
 
21
    return 1;
 
22
#endif
 
23
}
 
24
"""
 
25
 
 
26
    context.Message("Checking if using wincrypt ... ")
 
27
    st = context.env.TryRun(src, '.C')
 
28
    if st[0] == 0:
 
29
        context.Result('No')
 
30
    else:
 
31
        context.Result('Yes')
 
32
    return st[0]
 
33
    
 
34
env = GetNumpyEnvironment(ARGUMENTS)
 
35
env.Append(CPPPATH = scons_get_paths(env['include_bootstrap']))
 
36
 
 
37
mlib = scons_get_mathlib(env)
 
38
env.AppendUnique(LIBS = mlib)
 
39
 
 
40
# On windows, see if we should use Advapi32
 
41
if os.name == 'nt':
 
42
    config = env.NumpyConfigure(custom_tests = {'CheckWincrypt' : CheckWincrypt})
 
43
    if config.CheckWincrypt:
 
44
        config.env.AppendUnique(LIBS = 'Advapi32')
 
45
 
 
46
sources = [os.path.join('mtrand', x) for x in 
 
47
           ['mtrand.c', 'randomkit.c', 'initarray.c', 'distributions.c']]
 
48
 
 
49
# XXX: Pyrex dependency
 
50
mtrand = env.NumpyPythonExtension('mtrand', source = sources)