Refactor installation & scripts
This commit is contained in:
@@ -31,7 +31,7 @@ jobs:
|
||||
python-version: "3.11"
|
||||
cache: poetry
|
||||
check-latest: true
|
||||
- run: poetry install --only main,nuitka --sync --no-root --extras full --no-interaction
|
||||
- run: poetry install --only main,nuitka --sync --no-root --extras non-termux --no-interaction
|
||||
- run: poetry run --no-interaction python -m nuitka --onefile --python-flag='-m' --prefer-source-code --assume-yes-for-downloads proxy_scraper_checker
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
+15
-12
@@ -1,14 +1,17 @@
|
||||
#!/bin/sh
|
||||
base_path=~
|
||||
path="${base_path}/proxy-scraper-checker"
|
||||
download_path="${PREFIX}/tmp/proxy-scraper-checker.zip"
|
||||
|
||||
pkg upgrade --yes -o Dpkg::Options::='--force-confdef' &&
|
||||
pkg install --yes python python-pip &&
|
||||
if [ -d "${path}" ]; then
|
||||
rm -rf --interactive=once "${path}"
|
||||
fi &&
|
||||
curl -fsSLo "${download_path}" 'https://github.com/monosans/proxy-scraper-checker/archive/refs/heads/main.zip' &&
|
||||
unzip -d "${base_path}" "${download_path}" &&
|
||||
mv "${path}-main" "${path}" &&
|
||||
printf "proxy-scraper-checker installed successfully.\nRun 'cd %s && sh start-termux.sh'.\n" "${path}"
|
||||
set -eu
|
||||
|
||||
project_name="proxy-scraper-checker"
|
||||
base_path="${HOME}"
|
||||
install_path="${base_path}/${project_name}"
|
||||
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
|
||||
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}"
|
||||
|
||||
Generated
+3
-2
@@ -1276,9 +1276,10 @@ cffi = {version = ">=1.11", markers = "platform_python_implementation == \"PyPy\
|
||||
cffi = ["cffi (>=1.11)"]
|
||||
|
||||
[extras]
|
||||
full = ["aiodns", "uvloop"]
|
||||
non-termux = ["aiodns", "uvloop"]
|
||||
termux = []
|
||||
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.8"
|
||||
content-hash = "651aba81e455691f377a564e1900723d09dc6e85d6f9b405613cddb7d0c09e1b"
|
||||
content-hash = "4e9ed735edd49c4e3fd13e3b61aab06e290edbf29069994f399277e675a0ca07"
|
||||
|
||||
+3
-2
@@ -9,7 +9,7 @@ classifiers = ["Private :: Do Not Upload"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
aiodns = { version = ">=1.1.1,<4", optional = true }
|
||||
aiodns = { version = ">=1.1,<4", optional = true }
|
||||
aiofiles = ">=0.8"
|
||||
aiohttp = "^3.8.6"
|
||||
aiohttp-socks = ">=0.7,<0.9"
|
||||
@@ -26,7 +26,8 @@ typing-extensions = { version = "^4.4", python = "<3.11" }
|
||||
uvloop = { version = ">=0.14,<0.20", optional = true, markers = "platform_python_implementation == 'CPython' and (sys_platform == 'darwin' or sys_platform == 'linux')" }
|
||||
|
||||
[tool.poetry.extras]
|
||||
full = ["aiodns", "uvloop"]
|
||||
non-termux = ["aiodns", "uvloop"]
|
||||
termux = []
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
mypy = "1.8.0"
|
||||
|
||||
+5
-2
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
python3 -m venv --upgrade-deps .venv &&
|
||||
.venv/bin/python3 -m pip install -U --disable-pip-version-check --editable . &&
|
||||
|
||||
set -eu
|
||||
|
||||
python3 -m venv --upgrade-deps .venv
|
||||
.venv/bin/python3 -m pip install -U --disable-pip-version-check --editable .[termux]
|
||||
.venv/bin/python3 -m proxy_scraper_checker
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
py -m venv --upgrade-deps .venv
|
||||
.venv\Scripts\python.exe -m pip install -U --disable-pip-version-check --editable .[full]
|
||||
.venv\Scripts\python.exe -m pip install -U --disable-pip-version-check --editable .[non-termux]
|
||||
.venv\Scripts\python.exe -m proxy_scraper_checker
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
python3 -m venv --upgrade-deps .venv &&
|
||||
.venv/bin/python3 -m pip install -U --disable-pip-version-check --editable .[full] &&
|
||||
|
||||
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 proxy_scraper_checker
|
||||
|
||||
Reference in New Issue
Block a user