Example #1
0
def _get_distutils_build_directory():
    """
    Returns the directory distutils uses to build its files.
    We need this directory since we build extensions which have to link
    other ones.
    """
    pattern = "lib.{platform}-{major}.{minor}"
    return os.path.join(
        "build",
        pattern.format(
            platform=sysconfig.get_platform(),
            major=sys.version_info[0],
            minor=sys.version_info[1],
        ),
    )
Example #2
0
 def _GetDefaultBinIncludes(self):
     """Return the file names of libraries which must be included for the
        frozen executable to work."""
     python_shared_libs = []
     if sys.platform == "win32":
         if sysconfig.get_platform() == "mingw":
             name = distutils.sysconfig.get_config_var("INSTSONAME")
             if name:
                 python_shared_libs.append(name.replace(".dll.a", ".dll"))
         else:
             python_shared_libs += ["python%s.dll" % sys.version_info[0],
                                    "python%s%s.dll" % sys.version_info[:2],
                                    "vcruntime140.dll"]
     else:
         name = distutils.sysconfig.get_config_var("INSTSONAME")
         if name:
             python_shared_libs.append(self._RemoveVersionNumbers(name))
     return python_shared_libs
Example #3
0
def ext_build_dir(base):
    """Returns the build directory for compiled extensions"""
    pattern = "lib.{platform}-{version[0]}.{version[1]}"
    dirname = pattern.format(platform=sysconfig.get_platform(),
                             version=sys.version_info)
    return os.path.join(base, 'build', dirname)
def ext_build_dir(base):
    """Returns the build directory for compiled extensions"""
    pattern = "lib.{platform}-{version[0]}.{version[1]}"
    dirname = pattern.format(platform=sysconfig.get_platform(),
                             version=sys.version_info)
    return os.path.join(base, 'build', dirname)