Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions contrib/setup-dashd.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
import urllib.request
import zipfile

# Minimum Python version: `tarfile.extractall(..., filter="data")` was added
# in Python 3.12. Fail fast with a clear message instead of letting the
# extraction step crash mid-download with a cryptic `TypeError`.
MIN_PYTHON = (3, 12)
if sys.version_info < MIN_PYTHON:
sys.stderr.write(
"setup-dashd.py requires Python "
f"{MIN_PYTHON[0]}.{MIN_PYTHON[1]}+ "
f"(found {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}).\n"
)
sys.exit(1)

# Keep these defaults in sync with .github/workflows/build-and-test.yml
DASHVERSION = os.environ.get("DASHVERSION", "23.1.0")
TEST_DATA_VERSION = os.environ.get("TEST_DATA_VERSION", "v0.0.4")
Expand Down
Loading