Python distutils.msvccompiler.get_build_version() Examples
The following are 30
code examples of distutils.msvccompiler.get_build_version().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
distutils.msvccompiler
, or try the search function
.
Example #1
Source File: mingw32ccompiler.py From Fluid-Designer with GNU General Public License v3.0 | 6 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close() # # Write the rc file # manrc = manifest_rc(manifest_name(self), "exe") # rc = open(rc_name(self), "w") # self.temp_files.append(manrc) # rc.write(manrc) # rc.close()
Example #2
Source File: mingw32ccompiler.py From ImageFusion with MIT License | 6 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close() # # Write the rc file # manrc = manifest_rc(manifest_name(self), "exe") # rc = open(rc_name(self), "w") # self.temp_files.append(manrc) # rc.write(manrc) # rc.close()
Example #3
Source File: mingw32ccompiler.py From Computable with MIT License | 6 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close() # # Write the rc file # manrc = manifest_rc(manifest_name(self), "exe") # rc = open(rc_name(self), "w") # self.temp_files.append(manrc) # rc.write(manrc) # rc.close()
Example #4
Source File: mingw32ccompiler.py From elasticintel with GNU General Public License v3.0 | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #5
Source File: mingw32ccompiler.py From pySINDy with MIT License | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #6
Source File: setup.py From pySINDy with MIT License | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #7
Source File: cross_bdist_wininst.py From magnitude with MIT License | 5 votes |
def get_exe_bytes (self): from distutils.msvccompiler import get_build_version # If a target-version other than the current version has been # specified, then using the MSVC version from *this* build is no good. # Without actually finding and executing the target version and parsing # its sys.version, we just hard-code our knowledge of old versions. # NOTE: Possible alternative is to allow "--target-version" to # specify a Python executable rather than a simple version string. # We can then execute this program to obtain any info we need, such # as the real sys.version string for the build. cur_version = get_python_version() if self.target_version and self.target_version != cur_version: if self.target_version < "2.3": raise NotImplementedError elif self.target_version == "2.3": bv = "6" elif self.target_version in ("2.4", "2.5"): bv = "7.1" elif self.target_version in ("2.6", "2.7"): bv = "9.0" else: raise NotImplementedError else: # for current version - use authoritative check. bv = get_build_version() # wininst-x.y.exe is in the same directory as this file directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? # The uninstallers need to be available in $PYEXT_CROSS/uninst/*.exe # Use http://oss.itsystementwicklung.de/hg/pyext_cross_linux_to_win32/ # and copy it alongside your pysqlite checkout. filename = os.path.join(directory, os.path.join(os.environ["PYEXT_CROSS"], "uninst", "wininst-%s.exe" % bv)) return open(filename, "rb").read() # class bdist_wininst
Example #8
Source File: mingw32ccompiler.py From mxnet-lambda with Apache License 2.0 | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #9
Source File: setup.py From mxnet-lambda with Apache License 2.0 | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #10
Source File: setup.py From ImageFusion with MIT License | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #11
Source File: mingw32ccompiler.py From Splunking-Crime with GNU Affero General Public License v3.0 | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #12
Source File: setup.py From Splunking-Crime with GNU Affero General Public License v3.0 | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #13
Source File: cross_bdist_wininst.py From supersqlite with MIT License | 5 votes |
def get_exe_bytes (self): from distutils.msvccompiler import get_build_version # If a target-version other than the current version has been # specified, then using the MSVC version from *this* build is no good. # Without actually finding and executing the target version and parsing # its sys.version, we just hard-code our knowledge of old versions. # NOTE: Possible alternative is to allow "--target-version" to # specify a Python executable rather than a simple version string. # We can then execute this program to obtain any info we need, such # as the real sys.version string for the build. cur_version = get_python_version() if self.target_version and self.target_version != cur_version: if self.target_version < "2.3": raise NotImplementedError elif self.target_version == "2.3": bv = "6" elif self.target_version in ("2.4", "2.5"): bv = "7.1" elif self.target_version in ("2.6", "2.7"): bv = "9.0" else: raise NotImplementedError else: # for current version - use authoritative check. bv = get_build_version() # wininst-x.y.exe is in the same directory as this file directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? # The uninstallers need to be available in $PYEXT_CROSS/uninst/*.exe # Use http://oss.itsystementwicklung.de/hg/pyext_cross_linux_to_win32/ # and copy it alongside your pysqlite checkout. filename = os.path.join(directory, os.path.join(os.environ["PYEXT_CROSS"], "uninst", "wininst-%s.exe" % bv)) return open(filename, "rb").read() # class bdist_wininst
Example #14
Source File: bdist_wininst.py From medicare-demo with Apache License 2.0 | 5 votes |
def get_exe_bytes (self): from distutils.msvccompiler import get_build_version # If a target-version other than the current version has been # specified, then using the MSVC version from *this* build is no good. # Without actually finding and executing the target version and parsing # its sys.version, we just hard-code our knowledge of old versions. # NOTE: Possible alternative is to allow "--target-version" to # specify a Python executable rather than a simple version string. # We can then execute this program to obtain any info we need, such # as the real sys.version string for the build. cur_version = get_python_version() if self.target_version and self.target_version != cur_version: # If the target version is *later* than us, then we assume they # use what we use # string compares seem wrong, but are what sysconfig.py itself uses if self.target_version > cur_version: bv = get_build_version() else: if self.target_version < "2.4": bv = "6" else: bv = "7.1" else: # for current version - use authoritative check. bv = get_build_version() # wininst-x.y.exe is in the same directory as this file directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? filename = os.path.join(directory, "wininst-%s.exe" % bv) return open(filename, "rb").read() # class bdist_wininst
Example #15
Source File: setup.py From recruit with Apache License 2.0 | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #16
Source File: setup.py From elasticintel with GNU General Public License v3.0 | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #17
Source File: mingw32ccompiler.py From coffeegrindsize with MIT License | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #18
Source File: setup.py From coffeegrindsize with MIT License | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #19
Source File: mingw32ccompiler.py From Carnets with BSD 3-Clause "New" or "Revised" License | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #20
Source File: setup.py From Carnets with BSD 3-Clause "New" or "Revised" License | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #21
Source File: mingw32ccompiler.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #22
Source File: setup.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #23
Source File: mingw32ccompiler.py From twitter-stock-recommendation with MIT License | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #24
Source File: setup.py From twitter-stock-recommendation with MIT License | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #25
Source File: mingw32ccompiler.py From keras-lambda with MIT License | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #26
Source File: setup.py From keras-lambda with MIT License | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #27
Source File: mingw32ccompiler.py From Mastering-Elasticsearch-7.0 with MIT License | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #28
Source File: mingw32ccompiler.py From vnpy_crypto with MIT License | 5 votes |
def generate_manifest(config): msver = get_build_msvc_version() if msver is not None: if msver >= 8: check_embedded_msvcr_match_linked(msver) ma = int(msver) mi = int((msver - ma) * 10) # Write the manifest file manxml = msvc_manifest_xml(ma, mi) man = open(manifest_name(config), "w") config.temp_files.append(manifest_name(config)) man.write(manxml) man.close()
Example #29
Source File: setup.py From vnpy_crypto with MIT License | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False
Example #30
Source File: setup.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msvc runtime version is # 7.1 or above and we build with mingw ... # ... but we can't easily detect compiler version outside distutils command # context, so we will need to detect in randomkit whether we build with gcc msver = get_msvc_build_version() if msver and msver >= 8: return True return False