Exemple #1
0
 def get_ext_filename(self, ext_name):
     filename = build_ext_org.get_ext_filename(self, ext_name)
     split = os.path.splitext(filename)
     basename = os.path.splitext(split[0])[0]
     if basename in ['pymic_libxstream', 'liboffload_array']:
         filename = basename + split[1]
     return filename
Exemple #2
0
 def get_ext_filename(self, ext_name):
     filename = build_ext_org.get_ext_filename(self, ext_name)
     split = os.path.splitext(filename)
     basename = os.path.splitext(split[0])[0]
     if basename in ['pymic_libxstream', 'liboffload_array']:
         filename = basename + split[1]
     return filename
Exemple #3
0
 def get_ext_filename(self, ext_name):
     # Get the original shared library name. For Python 3, this name will be
     # suffixed with "<SOABI>.so", where <SOABI> will be something like
     # cpython-37m-x86_64-linux-gnu. On Python 2, there is no such ABI name.
     # The final extension, .so, would be .lib/.dll on Windows of course.
     ext_filename = build_ext.get_ext_filename(self, ext_name)
     # If `no_python_abi_suffix` is `True`, we omit the Python 3 ABI
     # component. This makes building shared libraries with setuptools that
     # aren't Python modules nicer.
     if self.no_python_abi_suffix and sys.version_info >= (3, 0):
         # The parts will be e.g. ["my_extension", "cpython-37m-x86_64-linux-gnu", "so"].
         ext_filename_parts = ext_filename.split(".")
         # Omit the second to last element.
         without_abi = ext_filename_parts[:-2] + ext_filename_parts[-1:]
         ext_filename = ".".join(without_abi)
     return ext_filename