diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eca4a72..25cf0b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: with: python-version: "3.12" check-latest: true - - run: uv run --extra non-termux --no-dev --group nuitka --frozen --python 3.12 python -m nuitka --standalone --python-flag='-m' --assume-yes-for-downloads --lto=yes proxy_scraper_checker + - run: uv run --no-dev --group nuitka --frozen --python 3.12 python -m nuitka --standalone --python-flag='-m' --assume-yes-for-downloads --lto=yes proxy_scraper_checker - run: mv config.toml proxy_scraper_checker.dist/ - if: ${{ github.event_name != 'pull_request' }} uses: actions/attest-build-provenance@v1 diff --git a/Dockerfile b/Dockerfile index 636016a..111c0ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN --mount=from=ghcr.io/astral-sh/uv,source=/uv,target=/bin/uv \ --mount=type=cache,target=/root/.cache/uv,sharing=locked \ --mount=source=pyproject.toml,target=pyproject.toml \ --mount=source=uv.lock,target=uv.lock \ - uv sync --extra non-termux --no-dev --no-install-project --frozen + uv sync --no-dev --no-install-project --frozen FROM python-base-stage AS python-run-stage diff --git a/README.md b/README.md index 6dc0e26..d469c12 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ To use `proxy-scraper-checker` in Termux, knowledge of the Unix command-line int - Edit `~/proxy-scraper-checker/config.toml` to your preference using a text editor (vim/nano). - To run `proxy-scraper-checker` use the following command: ```bash - cd ~/proxy-scraper-checker && sh start-termux.sh + cd ~/proxy-scraper-checker && sh start.sh ``` ## Something else? diff --git a/install-termux.sh b/install-termux.sh index f06e9b4..2beb609 100755 --- a/install-termux.sh +++ b/install-termux.sh @@ -9,9 +9,9 @@ download_path="${TMPDIR}/${project_name}.zip" [ -d "${install_path}" ] && rm -rf --interactive=once "${install_path}" pkg upgrade --yes -o Dpkg::Options::='--force-confdef' -pkg install --yes python python-pip +pkg install --yes binutils libuv python python-pip curl -fsSLo "${download_path}" "https://github.com/monosans/${project_name}/archive/refs/heads/main.zip" unzip -d "${base_path}" "${download_path}" rm -f "${download_path}" mv "${install_path}-main" "${install_path}" -printf "%s installed successfully.\nRun 'cd %s && sh start-termux.sh'.\n" "${project_name}" "${install_path}" +printf "%s installed successfully.\nRun 'cd %s && sh start.sh'.\n" "${project_name}" "${install_path}" diff --git a/pyproject.toml b/pyproject.toml index 9e21887..9ad8c82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,10 +23,8 @@ dependencies = [ "platformdirs<5", "rich>=12.3,<14", "tomli<3; python_version<'3.11'", - "winloop<0.1.7; implementation_name=='cpython' and (sys_platform=='cygwin' or sys_platform=='win32')", -] -optional-dependencies.non-termux = [ "uvloop>=0.14,<0.22; implementation_name=='cpython' and (sys_platform=='darwin' or sys_platform=='linux')", + "winloop<0.1.7; implementation_name=='cpython' and (sys_platform=='cygwin' or sys_platform=='win32')", ] urls.repository = "https://github.com/monosans/proxy-scraper-checker" diff --git a/start-termux.sh b/start-termux.sh deleted file mode 100755 index fa52b82..0000000 --- a/start-termux.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -eu - -python3 -m venv --upgrade-deps .venv -.venv/bin/python3 -m pip install -U --disable-pip-version-check --editable . -.venv/bin/python3 -m proxy_scraper_checker diff --git a/start.cmd b/start.cmd index 9ac8ab0..05f0c09 100644 --- a/start.cmd +++ b/start.cmd @@ -1,3 +1,3 @@ py -m venv --upgrade-deps .venv -.venv\Scripts\python.exe -m pip install -U --disable-pip-version-check --editable .[non-termux] +.venv\Scripts\python.exe -m pip install -U --disable-pip-version-check --editable . .venv\Scripts\python.exe -m proxy_scraper_checker diff --git a/start.sh b/start.sh index 9cfc2ac..fa52b82 100755 --- a/start.sh +++ b/start.sh @@ -3,5 +3,5 @@ set -eu python3 -m venv --upgrade-deps .venv -.venv/bin/python3 -m pip install -U --disable-pip-version-check --editable .[non-termux] +.venv/bin/python3 -m pip install -U --disable-pip-version-check --editable . .venv/bin/python3 -m proxy_scraper_checker diff --git a/uv.lock b/uv.lock index 6c7b99a..f44d947 100644 --- a/uv.lock +++ b/uv.lock @@ -960,12 +960,8 @@ dependencies = [ { name = "platformdirs" }, { name = "rich" }, { name = "tomli", marker = "python_full_version < '3.11'" }, - { name = "winloop", marker = "(implementation_name == 'cpython' and sys_platform == 'cygwin') or (implementation_name == 'cpython' and sys_platform == 'win32')" }, -] - -[package.optional-dependencies] -non-termux = [ { name = "uvloop", marker = "(implementation_name == 'cpython' and sys_platform == 'darwin') or (implementation_name == 'cpython' and sys_platform == 'linux')" }, + { name = "winloop", marker = "(implementation_name == 'cpython' and sys_platform == 'cygwin') or (implementation_name == 'cpython' and sys_platform == 'win32')" }, ] [package.dev-dependencies] @@ -995,7 +991,7 @@ requires-dist = [ { name = "platformdirs", specifier = "<5" }, { name = "rich", specifier = ">=12.3,<14" }, { name = "tomli", marker = "python_full_version < '3.11'", specifier = "<3" }, - { name = "uvloop", marker = "(implementation_name == 'cpython' and sys_platform == 'darwin' and extra == 'non-termux') or (implementation_name == 'cpython' and sys_platform == 'linux' and extra == 'non-termux')", specifier = ">=0.14,<0.22" }, + { name = "uvloop", marker = "(implementation_name == 'cpython' and sys_platform == 'darwin') or (implementation_name == 'cpython' and sys_platform == 'linux')", specifier = ">=0.14,<0.22" }, { name = "winloop", marker = "(implementation_name == 'cpython' and sys_platform == 'cygwin') or (implementation_name == 'cpython' and sys_platform == 'win32')", specifier = "<0.1.7" }, ]