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

« back to all changes in this revision

Viewing changes to numpy/distutils/fcompiler/compaq.py

  • 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:
4
4
import os
5
5
import sys
6
6
 
7
 
from numpy.distutils.cpuinfo import cpu
8
7
from numpy.distutils.fcompiler import FCompiler
 
8
from distutils.errors import DistutilsPlatformError
 
9
 
 
10
compilers = ['CompaqFCompiler']
 
11
if os.name != 'posix' or sys.platform[:6] == 'cygwin' :
 
12
    # Otherwise we'd get a false positive on posix systems with
 
13
    # case-insensitive filesystems (like darwin), because we'll pick
 
14
    # up /bin/df
 
15
    compilers.append('CompaqVisualFCompiler')
9
16
 
10
17
class CompaqFCompiler(FCompiler):
11
18
 
12
19
    compiler_type = 'compaq'
 
20
    description = 'Compaq Fortran Compiler'
13
21
    version_pattern = r'Compaq Fortran (?P<version>[^\s]*).*'
14
22
 
15
23
    if sys.platform[:5]=='linux':
18
26
        fc_exe = 'f90'
19
27
 
20
28
    executables = {
21
 
        'version_cmd'  : [fc_exe, "-version"],
 
29
        'version_cmd'  : ['<F90>', "-version"],
22
30
        'compiler_f77' : [fc_exe, "-f77rtl","-fixed"],
23
31
        'compiler_fix' : [fc_exe, "-fixed"],
24
32
        'compiler_f90' : [fc_exe],
25
 
        'linker_so'    : [fc_exe],
 
33
        'linker_so'    : ['<F90>'],
26
34
        'archiver'     : ["ar", "-cr"],
27
35
        'ranlib'       : ["ranlib"]
28
36
        }
47
55
class CompaqVisualFCompiler(FCompiler):
48
56
 
49
57
    compiler_type = 'compaqv'
 
58
    description = 'DIGITAL or Compaq Visual Fortran Compiler'
50
59
    version_pattern = r'(DIGITAL|Compaq) Visual Fortran Optimizing Compiler'\
51
60
                      ' Version (?P<version>[^\s]*).*'
52
61
 
61
70
 
62
71
    ar_exe = 'lib.exe'
63
72
    fc_exe = 'DF'
 
73
 
64
74
    if sys.platform=='win32':
65
75
        from distutils.msvccompiler import MSVCCompiler
66
 
        m = MSVCCompiler()
67
 
        m.initialize()
68
 
        ar_exe = m.lib
 
76
 
 
77
        try:
 
78
            m = MSVCCompiler()
 
79
            m.initialize()
 
80
            ar_exe = m.lib
 
81
        except DistutilsPlatformError, msg:
 
82
            print 'Ignoring "%s" (one should fix me in fcompiler/compaq.py)' % (msg)
 
83
        except AttributeError, msg:
 
84
            if '_MSVCCompiler__root' in str(msg):
 
85
                print 'Ignoring "%s" (I think it is msvccompiler.py bug)' % (msg)
 
86
            else:
 
87
                raise
69
88
 
70
89
    executables = {
71
 
        'version_cmd'  : ['DF', "/what"],
72
 
        'compiler_f77' : ['DF', "/f77rtl","/fixed"],
73
 
        'compiler_fix' : ['DF', "/fixed"],
74
 
        'compiler_f90' : ['DF'],
75
 
        'linker_so'    : ['DF'],
 
90
        'version_cmd'  : ['<F90>', "/what"],
 
91
        'compiler_f77' : [fc_exe, "/f77rtl","/fixed"],
 
92
        'compiler_fix' : [fc_exe, "/fixed"],
 
93
        'compiler_f90' : [fc_exe],
 
94
        'linker_so'    : ['<F90>'],
76
95
        'archiver'     : [ar_exe, "/OUT:"],
77
96
        'ranlib'       : None
78
97
        }