nh
This commit is contained in:
@@ -10,7 +10,7 @@ Works on Linux and Windows. Behavior:
|
||||
2) Update hydrus (git pull)
|
||||
3) Re-clone (remove and re-clone)
|
||||
- If `git` is not available, the script will fall back to downloading the repository ZIP and extracting it.
|
||||
- By default the script will create a repository-local virtual environment `./<dest>/.venv` after cloning/extraction; use `--no-venv` to skip this. By default the script will install dependencies from `requirements.txt` into that venv (use `--no-install-deps` to skip). After setup the script will print instructions for running the client; use `--run-client` to *launch* `hydrus_client.py` using the created repo venv's Python (use `--run-client-detached` to run it in the background).
|
||||
- By default the script will create a repository-local virtual environment `./<dest>/.venv` after cloning/extraction; use `--no-venv` to skip this. By default the script will install dependencies from `scripts/requirements.txt` into that venv (use `--no-install-deps` to skip). After setup the script will print instructions for running the client; use `--run-client` to *launch* `hydrus_client.py` using the created repo venv's Python (use `--run-client-detached` to run it in the background).
|
||||
|
||||
Examples:
|
||||
python scripts/hydrusnetwork.py
|
||||
@@ -510,17 +510,18 @@ def fix_permissions(
|
||||
|
||||
|
||||
def find_requirements(root: Path) -> Optional[Path]:
|
||||
"""Return a requirements.txt Path if found in common locations (root, client, requirements) or via a shallow search.
|
||||
"""Return a requirements.txt Path if found in common locations (scripts, root, client, requirements) or via a shallow search.
|
||||
|
||||
This tries a few sensible locations used by various projects and performs a shallow
|
||||
two-level walk to find a requirements.txt so installation works even if the file is
|
||||
not at the repository root.
|
||||
"""
|
||||
candidates = [
|
||||
root / "requirements.txt",
|
||||
root / "client" / "requirements.txt",
|
||||
root / "requirements" / "requirements.txt",
|
||||
]
|
||||
candidates = [
|
||||
root / "scripts" / "requirements.txt",
|
||||
root / "requirements.txt",
|
||||
root / "client" / "requirements.txt",
|
||||
root / "requirements" / "requirements.txt",
|
||||
]
|
||||
for c in candidates:
|
||||
if c.exists():
|
||||
return c
|
||||
|
||||
Reference in New Issue
Block a user