[Numpy-svn] r4164 - in branches/numpy.scons: . numpy/distutils/scons

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Oct 9 23:31:53 EDT 2007


Author: cdavid
Date: 2007-10-09 22:31:41 -0500 (Tue, 09 Oct 2007)
New Revision: 4164

Modified:
   branches/numpy.scons/
   branches/numpy.scons/numpy/distutils/scons/numpyenv.py
Log:
Try to detect if suncc is used, for special initialization of scons env.


Property changes on: branches/numpy.scons
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2007-10-10 11:17:10.790999889 +0900
committer: David Cournapeau <david at ar.media.kyoto-u.ac.jp>
properties: 
	branch-nick: numpy.scons

   + timestamp: 2007-10-10 12:22:18.861999989 +0900
committer: David Cournapeau <david at ar.media.kyoto-u.ac.jp>
properties: 
	branch-nick: numpy.scons

Name: bzr:file-ids
   - test.sh	test.sh-20071010021651-sb161covas3h5rf8-1
numpy/scons_fake/__init__.py	__init__.py-20071010021643-a8zje05xk9kn70r1-1
numpy/scons_fake/pyext/__init__.py	__init__.py-20071010021648-c3je6ovvif87gtea-1

   + 
Name: bzr:revision-id:v3-trunk0
   - 3737 david at david-laptop-20070920080908-n8pj8vmszdir3zoa
3738 david at david-laptop-20070920081509-58kkojgmml3t7jxs
3739 david at david-laptop-20070920081910-phlk1ujthksgpm0z
3740 david at david-laptop-20070920082641-bdhrt6eafeoli50i
3741 david at ar.media.kyoto-u.ac.jp-20070920130730-satdeppbh1k0bq2p
3743 david at ar.media.kyoto-u.ac.jp-20070921073742-vpv8pwv0j8fbd93m
3744 david at david-laptop-20070922101656-61kfi2faucemr2rl
3745 david at david-laptop-20070922113708-ror18thshang1cpu
3747 david at david-laptop-20070922140534-n9xsl096tjrzmct1
3749 david at david-laptop-20070922154007-usit009fr6vp377j
3750 david at david-laptop-20070923070011-leu2ozc2fy1q5cht
3751 david at david-laptop-20070924015925-dhsiao40jp7zsfp9
3752 david at ar.media.kyoto-u.ac.jp-20070924070657-nbw23j0ayan30cli
3753 david at ar.media.kyoto-u.ac.jp-20070924082918-i1lc1zikywi8czj4
3754 david at ar.media.kyoto-u.ac.jp-20070924083008-c0edtt8zs31yeh1q
3755 david at ar.media.kyoto-u.ac.jp-20070924112351-pnnho638cohz6lj1
3756 david at david-laptop-20070924153247-yftud00bynilxv69
3757 david at david-laptop-20070924163545-pish34x9fq2h66aj
3758 david at david-laptop-20070924164633-iiyygcaw81ji3n34
3759 david at david-laptop-20070924170201-y14v2yzikdpvamfp
3760 david at david-laptop-20070924171208-5bmitorzf49d1aa2
3761 david at david-laptop-20070925014444-ns9v90gotnxt39mq
3769 david at david-laptop-20070925145952-4osi81tvch7v6luj
3773 david at ar.media.kyoto-u.ac.jp-20070926073429-2kdc6yf1o210aer0
3774 david at ar.media.kyoto-u.ac.jp-20070926084356-938djoytjap90rmo
3775 david at ar.media.kyoto-u.ac.jp-20070926085329-3gquq3gu2k8rgzb0
3776 david at ar.media.kyoto-u.ac.jp-20071009084906-9kradhwpu7su633x
3777 david at ar.media.kyoto-u.ac.jp-20071009093339-q5nf5me6ikdi48k6
3778 david at david-laptop-20071009152108-xh5cltii0h6zjk9b
3779 david at david-laptop-20071009154954-v5se05gbq60opo1z
3780 david at david-laptop-20071009223102-vz2sgf5i6pncxsd8
3781 david at david-laptop-20071009225259-13m6enwqk4w9uihe
3782 david at ar.media.kyoto-u.ac.jp-20071010021710-liz2jvw0ggbxrtgi

   + 3737 david at david-laptop-20070920080908-n8pj8vmszdir3zoa
3738 david at david-laptop-20070920081509-58kkojgmml3t7jxs
3739 david at david-laptop-20070920081910-phlk1ujthksgpm0z
3740 david at david-laptop-20070920082641-bdhrt6eafeoli50i
3741 david at ar.media.kyoto-u.ac.jp-20070920130730-satdeppbh1k0bq2p
3743 david at ar.media.kyoto-u.ac.jp-20070921073742-vpv8pwv0j8fbd93m
3744 david at david-laptop-20070922101656-61kfi2faucemr2rl
3745 david at david-laptop-20070922113708-ror18thshang1cpu
3747 david at david-laptop-20070922140534-n9xsl096tjrzmct1
3749 david at david-laptop-20070922154007-usit009fr6vp377j
3750 david at david-laptop-20070923070011-leu2ozc2fy1q5cht
3751 david at david-laptop-20070924015925-dhsiao40jp7zsfp9
3752 david at ar.media.kyoto-u.ac.jp-20070924070657-nbw23j0ayan30cli
3753 david at ar.media.kyoto-u.ac.jp-20070924082918-i1lc1zikywi8czj4
3754 david at ar.media.kyoto-u.ac.jp-20070924083008-c0edtt8zs31yeh1q
3755 david at ar.media.kyoto-u.ac.jp-20070924112351-pnnho638cohz6lj1
3756 david at david-laptop-20070924153247-yftud00bynilxv69
3757 david at david-laptop-20070924163545-pish34x9fq2h66aj
3758 david at david-laptop-20070924164633-iiyygcaw81ji3n34
3759 david at david-laptop-20070924170201-y14v2yzikdpvamfp
3760 david at david-laptop-20070924171208-5bmitorzf49d1aa2
3761 david at david-laptop-20070925014444-ns9v90gotnxt39mq
3769 david at david-laptop-20070925145952-4osi81tvch7v6luj
3773 david at ar.media.kyoto-u.ac.jp-20070926073429-2kdc6yf1o210aer0
3774 david at ar.media.kyoto-u.ac.jp-20070926084356-938djoytjap90rmo
3775 david at ar.media.kyoto-u.ac.jp-20070926085329-3gquq3gu2k8rgzb0
3776 david at ar.media.kyoto-u.ac.jp-20071009084906-9kradhwpu7su633x
3777 david at ar.media.kyoto-u.ac.jp-20071009093339-q5nf5me6ikdi48k6
3778 david at david-laptop-20071009152108-xh5cltii0h6zjk9b
3779 david at david-laptop-20071009154954-v5se05gbq60opo1z
3780 david at david-laptop-20071009223102-vz2sgf5i6pncxsd8
3781 david at david-laptop-20071009225259-13m6enwqk4w9uihe
3782 david at ar.media.kyoto-u.ac.jp-20071010021710-liz2jvw0ggbxrtgi
3783 david at ar.media.kyoto-u.ac.jp-20071010032218-8qzxvdmith85a056


Modified: branches/numpy.scons/numpy/distutils/scons/numpyenv.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/numpyenv.py	2007-10-10 02:27:53 UTC (rev 4163)
+++ branches/numpy.scons/numpy/distutils/scons/numpyenv.py	2007-10-10 03:31:41 UTC (rev 4164)
@@ -23,6 +23,21 @@
 DEF_LINKERS, DEF_C_COMPILERS, DEF_CXX_COMPILERS, DEF_ASSEMBLERS, \
 DEF_FORTRAN_COMPILERS, DEF_ARS, DEF_OTHER_TOOLS = tool_list(pyplat2sconsplat())
 
+def is_cc_suncc(fullpath):
+    """Return true if the compiler is suncc."""
+    # I wish there was a better way: we launch suncc -V, read the output, and
+    # returns true if this succeeds and Sun is found in the output.
+    import os
+    import re
+    suncc = re.compile('[Ss][Uu][Nn]')
+    # Redirect stderr to stdout
+    cmd = fullpath + ' -V 2>1'
+    out = os.popen(cmd)
+    cnt = out.read()
+    st = out.close()
+
+    return not(st) and suncc.search(cnt)
+
 def GetNumpyOptions(args):
     """Call this with args=ARGUMENTS to take into account command line args."""
     opts = Options(None, args)
@@ -71,6 +86,8 @@
                              topdir = os.path.split(env['cc_opt_path'])[0])
                     t(env) 
                 else:
+                    if is_cc_suncc(pjoin(env['cc_opt_path'], env['cc_opt'])):
+                        env['cc_opt'] == 'suncc'
                     # XXX: what is the right way to add one directory in the
                     # PATH ? (may not work on windows).
                     t = Tool(env['cc_opt'])




More information about the Numpy-svn mailing list