8000 BLD: fix for INTEL compiler build failure on linux when import msvc by yolanda15 · Pull Request #6211 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BLD: fix for INTEL compiler build failure on linux when import msvc #6211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 37 additions & 31 deletions numpy/distutils/intelccompiler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import division, absolute_import, print_function

import sys

from distutils.unixccompiler import UnixCCompiler
from numpy.distutils.exec_command import find_executable
from distutils.msvc9compiler import MSVCCompiler
from numpy.distutils.ccompiler import simple_version_match


Expand Down Expand Up @@ -54,34 +55,39 @@ def __init__(self, verbose=0, dry_run=0, force=0):
linker_so=compiler + ' -shared')


class IntelCCompilerW(MSVCCompiler):
"""
A modified Intel compiler on Windows compatible with an MSVC-built Python.
"""
compiler_type = 'intelw'

def __init__(self, verbose=0, dry_run=0, force=0):
MSVCCompiler.__init__(self, verbose, dry_run, force)
version_match = simple_version_match(start='Intel\(R\).*?32,')
self.__version = version_match

def initialize(self, plat_name=None):
MSVCCompiler.initialize(self, plat_name)
self.cc = self.find_exe("icl.exe")
self.lib = self.find_exe("xilib")
self.linker = self.find_exe("xilink")
self.compile_options = ['/nologo', '/O3', '/MD', '/W3', '/Qstd=c99']
self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',
'/Qstd=c99', '/Z7', '/D_DEBUG']
if sys.platform == 'win32':
from distutils.msvc9compiler import MSVCCompiler

class IntelCCompilerW(MSVCCompiler):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, should have two blank lines above the class declaration. It is useful to run pep8 over code just to keep it more or less in line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Charris, thanks for letting me know this. I just tried the pep8 online checker and correct serveral coding styles errors.

"""
A modified Intel compiler compatible with an MSVC-built Python.
"""
compiler_type = 'intelw'

def __init__(self, verbose=0, dry_run=0, force=0):
MSVCCompiler.__init__(self, verbose, dry_run, force)
version_match = simple_version_match(start='Intel\(R\).*?32,')
self.__version = version_match

def initialize(self, plat_name=None):
MSVCCompiler.initialize(self, plat_name)
self.cc = self.find_exe("icl.exe")
self.lib = self.find_exe("xilib")
self.linker = self.find_exe("xilink")
self.compile_options = ['/nologo', '/O3', '/MD', '/W3',
'/Qstd=c99']
self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',
'/Qstd=c99', '/Z7', '/D_DEBUG']

class IntelEM64TCCompilerW(IntelCCompilerW):
"""
A modified Intel x86_64 compiler compatible with
a 64bit MSVC-built Python.
"""
compiler_type = 'intelemw'

def __init__(self, verbose=0, dry_run=0, force=0):
MSVCCompiler.__init__(self, verbose, dry_run, force)
version_match = simple_version_match(start='Intel\(R\).*?64,')
self.__version = version_match


class IntelEM64TCCompilerW(IntelCCompilerW):
"""
A modified Intel x86_64 compiler compatible with a 64bit MSVC-built Python.
"""
compiler_type = 'intelemw'

def __init__(self, verbose=0, dry_run=0, force=0):
MSVCCompiler.__init__(self, verbose, dry_run, force)
version_match = simple_version_match(start='Intel\(R\).*?64,')
self.__version = version_match
0