Skip to content

Commit

Permalink
fix: install uvloop on termux
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Nov 27, 2024
1 parent 3e7841b commit dbb100b
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
4 changes: 2 additions & 2 deletions install-termux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
7 changes: 0 additions & 7 deletions start-termux.sh

This file was deleted.

2 changes: 1 addition & 1 deletion start.cmd
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 2 additions & 6 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dbb100b

Please sign in to comment.