From bc6fed5eda23bd935de56fa0e1c81a1aa91df7d8 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Thu, 10 Dec 2020 06:15:21 +0800 Subject: [PATCH] build: remove requests from git submodule (#26908) --- .circleci/config.yml | 34 ++++------------------------------ .gitmodules | 3 --- DEPS | 19 ------------------- appveyor.yml | 4 +--- vendor/requests | 1 - 5 files changed, 5 insertions(+), 56 deletions(-) delete mode 100644 .gitmodules delete mode 160000 vendor/requests diff --git a/.circleci/config.yml b/.circleci/config.yml index 099e2ae5c5a7..acb432045b0c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1418,9 +1418,6 @@ commands: restore-src-cache: type: boolean default: true - preserve-vendor-dirs: - type: boolean - default: false steps: - when: condition: << parameters.attach >> @@ -1458,26 +1455,11 @@ commands: - store_artifacts: path: patches # These next few steps reset Electron to the correct commit regardless of which cache was restored - - when: - condition: << parameters.preserve-vendor-dirs >> - steps: - - run: - name: Preserve vendor dirs for release - command: | - mv src/electron/vendor/requests . - run: name: Wipe Electron command: rm -rf src/electron - *step-checkout-electron - *step-run-electron-only-hooks - - when: - condition: << parameters.preserve-vendor-dirs >> - steps: - - run: - name: Preserve vendor dirs for release - command: | - rm -rf src/electron/vendor/requests - mv requests src/electron/vendor/requests - *step-generate-deps-hash-cleanly - *step-mark-sync-done - *step-minimize-workspace-size-from-checkout @@ -1673,7 +1655,7 @@ jobs: <<: *machine-linux-2xlarge environment: <<: *env-linux-2xlarge - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True --custom-var=checkout_requests=True' + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' steps: - electron-build: persist: false @@ -1681,7 +1663,6 @@ jobs: checkout: true persist-checkout: true restore-src-cache: false - preserve-vendor-dirs: true linux-checkout-fast: <<: *machine-linux-2xlarge @@ -1732,7 +1713,7 @@ jobs: <<: *env-linux-2xlarge <<: *env-testing-build <<: *env-macos-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac --custom-var=checkout_requests=True' + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' steps: - electron-build: persist: false @@ -1740,7 +1721,6 @@ jobs: checkout: true persist-checkout: true restore-src-cache: false - preserve-vendor-dirs: true mac-checkout-fast: <<: *machine-linux-2xlarge @@ -1817,7 +1797,6 @@ jobs: <<: *machine-linux-2xlarge environment: <<: *env-linux-2xlarge-release - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_requests=True' <<: *env-release-build UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> <<: *env-ninja-status @@ -1870,7 +1849,6 @@ jobs: <<: *machine-linux-2xlarge environment: <<: *env-linux-2xlarge-release - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_requests=True' <<: *env-ia32 <<: *env-release-build <<: *env-32bit-release @@ -1931,7 +1909,7 @@ jobs: <<: *env-arm <<: *env-release-build <<: *env-32bit-release - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_requests=True' + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True' UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> <<: *env-ninja-status steps: @@ -1996,7 +1974,7 @@ jobs: <<: *env-linux-2xlarge-release <<: *env-arm64 <<: *env-release-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True --custom-var=checkout_requests=True' + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True' UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> <<: *env-ninja-status steps: @@ -2058,7 +2036,6 @@ jobs: environment: <<: *env-mac-large-release <<: *env-release-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_requests=True' UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> <<: *env-ninja-status steps: @@ -2072,7 +2049,6 @@ jobs: <<: *env-mac-large-release <<: *env-release-build <<: *env-apple-silicon - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_requests=True' UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> <<: *env-ninja-status steps: @@ -2166,7 +2142,6 @@ jobs: <<: *env-mac-large-release <<: *env-mas <<: *env-release-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_requests=True' UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> <<: *env-ninja-status steps: @@ -2180,7 +2155,6 @@ jobs: <<: *env-mac-large-release <<: *env-mas-apple-silicon <<: *env-release-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_requests=True' UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> <<: *env-ninja-status steps: diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 7c29669a4771..000000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "vendor/requests"] - path = vendor/requests - url = https://github.com/kennethreitz/requests diff --git a/DEPS b/DEPS index 718a65673e2b..82f8e4c4a935 100644 --- a/DEPS +++ b/DEPS @@ -23,12 +23,10 @@ vars = { 'cdc0729c8bf8576bfef18629186e1e9ecf1b0d9f', 'pyyaml_version': '3.12', - 'requests_version': 'e4d59bedfd3c7f4f254f4f5d036587bcd8152458', 'chromium_git': 'https://chromium.googlesource.com', 'electron_git': 'https://github.com/electron', 'nodejs_git': 'https://github.com/nodejs', - 'requests_git': 'https://github.com/kennethreitz', 'yaml_git': 'https://github.com/yaml', 'squirrel_git': 'https://github.com/Squirrel', @@ -50,9 +48,6 @@ vars = { # It's only needed to parse the native tests configurations. 'checkout_pyyaml': False, - # Python "requests" module is used for releases only. - 'checkout_requests': False, - 'mac_xcode_version': 'default', # To allow running hooks without parsing the DEPS tree @@ -95,10 +90,6 @@ deps = { 'url': (Var("yaml_git")) + '/pyyaml.git@' + (Var("pyyaml_version")), 'condition': 'checkout_pyyaml and process_deps', }, - 'src/electron/vendor/requests': { - 'url': Var('requests_git') + '/requests.git' + '@' + Var('requests_version'), - 'condition': 'checkout_requests and process_deps', - }, 'src/third_party/squirrel.mac': { 'url': Var("squirrel_git") + '/Squirrel.Mac.git@' + Var("squirrel.mac_version"), 'condition': 'process_deps', @@ -162,16 +153,6 @@ hooks = [ 'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python3", "script/lib/npx.py", "yarn@' + (Var("yarn_version")) + '", "install", "--frozen-lockfile"]);', ], }, - { - 'name': 'setup_requests', - 'pattern': 'src/electron', - 'condition': 'checkout_requests and process_deps', - 'action': [ - 'python3', - '-c', - 'import os, subprocess; os.chdir(os.path.join("src", "electron", "vendor", "requests")); subprocess.check_call(["python3", "setup.py", "build"]);', - ], - }, ] recursedeps = [ diff --git a/appveyor.yml b/appveyor.yml index 1766f764f00a..f51a09ee7de9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,9 +67,7 @@ build_script: - ps: Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron - ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools" - ps: >- - if ($env:GN_CONFIG -eq 'release') { - $env:GCLIENT_EXTRA_ARGS="$env:GCLIENT_EXTRA_ARGS --custom-var=checkout_requests=True" - } else { + if ($env:GN_CONFIG -ne 'release') { $env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] " } - >- diff --git a/vendor/requests b/vendor/requests deleted file mode 160000 index e4d59bedfd3c..000000000000 --- a/vendor/requests +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e4d59bedfd3c7f4f254f4f5d036587bcd8152458