From 2abadedb13099ea68ee2e10a9ddfee1e9ed4c652 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Wed, 17 May 2023 10:32:49 +0900 Subject: [PATCH 1/2] [tools] Remove requests dependency --- README.md | 3 +-- tools/download_engine.py | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9946d8e..b896398 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,8 @@ The Flutter embedder for Tizen. - [LLVM](https://apt.llvm.org) (10 or later) - `sudo apt install clang-12` - Additional dependencies - - `sudo apt install git python3 python3-pip rpm2cpio cpio` + - `sudo apt install git python3 rpm2cpio cpio` - `sudo apt install binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu binutils-i686-linux-gnu` - - `pip3 install requests` ### Environment setup diff --git a/tools/download_engine.py b/tools/download_engine.py index 6e7ec9c..f7c9219 100755 --- a/tools/download_engine.py +++ b/tools/download_engine.py @@ -3,7 +3,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import requests import shutil import sys import urllib.request @@ -22,11 +21,13 @@ def main(): if stamp_file.is_file(): stamp = stamp_file.read_text().strip() - version = '' # The GitHub REST API cannot be used in the company network due to an # "API rate limit exceeded" error. The following is a workaround. - request = requests.get('{}/latest'.format(github_url)) - redirected_url = request.url + redirected_url = '' + with urllib.request.urlopen('{}/latest'.format(github_url)) as response: + redirected_url = response.geturl() + + version = '' if '/tag/' in redirected_url: version = redirected_url.split('/tag/')[-1] From 455abdc7d3f78807c41c91c34ccc451e23e8ed03 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Fri, 19 May 2023 14:22:06 +0900 Subject: [PATCH 2/2] [ci] Update workflow files --- .github/workflows/analyze.yml | 1 - .github/workflows/build.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index aede0c9..6991a9a 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -17,7 +17,6 @@ jobs: - name: Run gclient sync run: | - pip3 install requests gclient config --name=src --unmanaged https://github.com/${{ github.repository }} gclient sync -v --no-history --shallow --nohooks diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f4661d..92fe46f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y rpm2cpio cpio binutils-${{ matrix.triple }} - pip3 install requests - name: Install depot_tools run: |