def copy_files(context): make_sure_path_exists( os.path.join(__build_base_path, "install", "bin", "plugins", "data", "PyQt5")) srcdir = os.path.join(python.python['build_path'], "Lib", "site-packages", "PyQt5") dstdir = os.path.join(__build_base_path, "install", "bin", "plugins", "data", "PyQt5") shutil.copy(os.path.join(srcdir, "__init__.py"), os.path.join(dstdir, "__init__.py")) pyqt_sip_ver = config["pyqt_sip_version"].split('.') shutil.copy( os.path.join(sip.sip["build_path"], "sipbuild", "module", "source", "{}.{}".format(pyqt_sip_ver[0], pyqt_sip_ver[1]), "sip.pyi"), os.path.join(dstdir, "sip.pyi")) for file in glob(os.path.join(srcdir, "sip*")): shutil.copy(file, dstdir) for module in enabled_modules: shutil.copy(os.path.join(srcdir, module + ".pyd"), os.path.join(dstdir, module + ".pyd")) try: shutil.copy(os.path.join(srcdir, module + ".pyi"), os.path.join(dstdir, module + ".pyi")) except FileNotFoundError: pass return True
def copy_pyd(context): # fix fir pre compiled deps for file in glob( os.path.join(config["paths"]["build"], "PyQt5-{}".format(pyqt_version), "*.bat")): shutil.copy(file, os.path.join(python.python['build_path'])) # for f in glob(os.path.join(build_path, openssl_path, "bin", "ssleay32.dll")): # shutil.copy(f, os.path.join(dest_bin)) make_sure_path_exists( os.path.join(__build_base_path, "install", "bin", "plugins", "data", "PyQt5")) srcdir = os.path.join(python.python['build_path'], "Lib", "site-packages", "PyQt5") dstdir = os.path.join(__build_base_path, "install", "bin", "plugins", "data", "PyQt5") shutil.copy(os.path.join(srcdir, "__init__.py"), os.path.join(dstdir, "__init__.py")) for module in enabled_modules: shutil.copy(os.path.join(srcdir, module + ".pyd"), os.path.join(dstdir, module + ".pyd")) try: shutil.copy(os.path.join(srcdir, module + ".pyi"), os.path.join(dstdir, module + ".pyi")) except FileNotFoundError: pass return True
def install(context): make_sure_path_exists(os.path.join(path_install, "libs")) make_sure_path_exists(os.path.join(path_install, "bin")) path_segments = [context['build_path'], "PCbuild"] if config['architecture'] == "x86_64": path_segments.append("amd64") for f in glob(os.path.join(*path_segments,"*.lib")): shutil.copy(f, os.path.join(path_install, "libs")) for f in glob(os.path.join(*path_segments,"*.dll")): shutil.copy(f, os.path.join(path_install, "bin")) shutil.copy(os.path.join(path_install, "libs", "python{}.lib".format(python_version.replace(".", ""))), os.path.join(path_install, "libs", "python3.lib")) return True
def install(context): make_sure_path_exists(os.path.join(path_install, "libs")) make_sure_path_exists(os.path.join(context["build_path"], "libs")) make_sure_path_exists(os.path.join(path_install, "bin")) make_sure_path_exists(os.path.join(path_install, "pdb")) path_segments = [context['build_path'], "PCbuild", bitness()] for f in glob(os.path.join(*path_segments, "*.lib")): shutil.copy(f, os.path.join(path_install, "libs")) for f in glob(os.path.join(*path_segments, "*.lib")): shutil.copy(f, os.path.join(context["build_path"], "libs")) shutil.copy( os.path.join(*path_segments, "python{}.dll".format(python_version.replace(".", ""))), os.path.join(path_install, "bin")) shutil.copy( os.path.join(*path_segments, "python{}.dll".format(python_version.replace(".", ""))), os.path.join(context["build_path"], "libs")) for f in glob(os.path.join(*path_segments, "libffi-*.dll")): shutil.copy(f, os.path.join(path_install, "bin")) shutil.copy( os.path.join(*path_segments, "python{}.pdb".format(python_version.replace(".", ""))), os.path.join(path_install, "pdb")) for f in glob(os.path.join(*path_segments, "_*.pdb")): shutil.copy(f, os.path.join(path_install, "pdb")) return True
def copy_pyd(context): make_sure_path_exists( os.path.join(config["__build_base_path"], "install", "bin", "plugins", "data", "PyQt5")) for f in glob( os.path.join(python_path, "Lib", "site-packages", "PyQt5", "sip.pyd")): shutil.copy( f, os.path.join(config["__build_base_path"], "install", "bin", "plugins", "data", "PyQt5", "sip.pyd")) for f in glob( os.path.join(python_path, "Lib", "site-packages", "PyQt5", "sip.pyi")): shutil.copy( f, os.path.join(config["__build_base_path"], "install", "bin", "plugins", "data", "PyQt5", "sip.pyi")) return True