MCPcopy Create free account
hub / github.com/cztomczak/cefpython / getenv

Function getenv

tools/automate.py:895–952  ·  view source on GitHub ↗

Env variables passed to shell when running commands. See cef/AutomatedBuildSetup.md for reference.

()

Source from the content-addressed store, hash-verified

893
894
895def getenv():
896 """Env variables passed to shell when running commands.
897 See cef/AutomatedBuildSetup.md for reference."""
898 env = os.environ
899
900 # PATH
901 if Options.build_cef:
902 if os.path.exists(Options.depot_tools_dir):
903 env["PATH"] = Options.depot_tools_dir + os.pathsep + env["PATH"]
904
905 # Generators: ninja, msvs
906 env["GYP_GENERATORS"] = Options.gyp_generators
907
908 # VS version
909 if platform.system() == "Windows":
910 env["GYP_MSVS_VERSION"] = Options.gyp_msvs_version
911
912 # GN configuration
913 env["CEF_USE_GN"] = "1"
914 # Issue #73 patch applied here with "use_allocator=none"
915 env["GN_DEFINES"] = "use_sysroot=true use_allocator=none symbol_level=1"
916
917 # Link with GTK 3 (Issue #446)
918 if Options.use_gtk3:
919 env["GN_DEFINES"] += " use_gtk3=true"
920
921 # Use ccache for faster (re)builds
922 if Options.use_ccache:
923 env["GN_DEFINES"] += " cc_wrapper=ccache"
924
925 # Enable proprietary codecs
926 if Options.proprietary_codecs:
927 env["GN_DEFINES"] += " proprietary_codecs=true ffmpeg_branding=Chrome"
928
929 # To perform an official build set GYP_DEFINES=buildtype=Official.
930 # This will disable debugging code and enable additional link-time
931 # optimizations in Release builds.
932 if Options.release_build and not Options.fast_build:
933 env["GN_DEFINES"] += " is_official_build=true"
934
935 # Blurry font rendering on Linux (Isssue #402)
936 if Options.use_system_freetype:
937 env["GN_DEFINES"] += " use_system_freetype=true"
938
939 # GYP configuration is DEPRECATED, however it is still set in
940 # upstream Linux configuration on AutomatedBuildSetup wiki page,
941 # so setting it here as well.
942 env["GYP_DEFINES"] = "disable_nacl=1 use_sysroot=1 use_allocator=none"
943 if Options.x86:
944 env["GYP_DEFINES"] += " host_arch=x86_64 target_arch=ia32"
945 if Options.release_build and not Options.fast_build:
946 env["GYP_DEFINES"] += " buildtype=Official"
947
948 # Modifications to upstream automate-git.py introduced
949 # CEFPYTHON_NINJA_JOBS env key.
950 env["CEFPYTHON_NINJA_JOBS"] = str(Options.ninja_jobs)
951
952 return env

Callers 2

run_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected