From 93ac60c707e4f33be60611511da7ed86ecd6bcab Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 19:40:02 +0000 Subject: [PATCH] docs: complete the arcticpy install recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recipe said "install it after numpy" and gave only the bare `pip install arcticpy` line. That is not enough to install arcticpy on a clean modern venv — three gaps, each reproduced against a clean build of 2.6: - setuptools/wheel — --no-build-isolation does not read arcticpy's build-system.requires, so build deps must already be present. Without setuptools: `BackendUnavailable: Cannot import 'setuptools.build_meta'`. Python 3.12+ venvs no longer ship setuptools by default. - cython — named nowhere in this file, though the build needs it. - scipy/matplotlib — --no-deps suppresses arcticpy's runtime dependencies, but arcticpy/__init__.py imports read_noise, which imports both at import time, so a successful build still fails at `import arcticpy`. Also corrects the verification: arcticpy exposes no __version__ attribute, so `arcticpy.__version__` raises AttributeError on a healthy install. Points at PyAutoHeart/.github/actions/install-arcticpy as the recipe's single owner and the home of the arcticpy==2.6 pin. Refs PyAutoLabs/PyAutoHeart#170 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_018nDAxBEavkzb6Zkz1cYHef --- AGENTS.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index db3afcc..1df2707 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -41,14 +41,31 @@ import autocti.plot as aplt ### arcticpy `import autocti` requires **arcticpy** (the C++ arctic clocking code). It is not a pip -dependency of `autocti` — install it after numpy with: +dependency of `autocti` — it is a source-only C++ sdist, and a naive `pip install arcticpy` +downgrades numpy below 2.0. Install it with: ```bash +sudo apt-get update && sudo apt-get install -y libgsl-dev +pip install --upgrade pip setuptools wheel # BUILD deps — --no-build-isolation +pip install numpy cython # will not supply these +pip install scipy matplotlib # RUNTIME deps --no-deps suppresses pip install arcticpy==2.6 --no-build-isolation --no-deps ``` -(It needs `libgsl-dev` and a C++ toolchain to build; see `PyAutoCTI/AGENTS.md` for the no-root -header workaround, and note a naive `pip install arcticpy` downgrades numpy below 2.0.) +Both flags have to be paid back by hand, which is where installs go wrong: +`--no-build-isolation` means pip does not read arcticpy's `build-system.requires`, so build +deps must already be present (without `setuptools` the build fails with `BackendUnavailable: +Cannot import 'setuptools.build_meta'`, and Python 3.12+ venvs no longer ship it); +`--no-deps` means `arcticpy/__init__.py`'s import of `read_noise` — which imports `scipy` and +`matplotlib` — has nothing to import, so a successful build still fails at `import arcticpy`. + +Verify with `python -c "import arcticpy; from importlib.metadata import version; +print(version('arcticpy'))"`. Note arcticpy exposes **no** `__version__` attribute, so +`arcticpy.__version__` raises `AttributeError` even on a healthy install. + +The full note — including the no-root header workaround — is `PyAutoCTI/AGENTS.md` +§arcticpy. The recipe's single owner, and the single `arcticpy==2.6` pin, is +`PyAutoHeart/.github/actions/install-arcticpy`, the action every CTI repo's CI runs. ## Testing / validation