diff --git a/changelog.d/+pypi-gcccore.doc.md b/changelog.d/+pypi-gcccore.doc.md new file mode 100644 index 00000000..a824fee7 --- /dev/null +++ b/changelog.d/+pypi-gcccore.doc.md @@ -0,0 +1 @@ +The PyPI how-to and the `package-plan` skill plan the pure-Python beautifulsoup4 example on `GCCcore/15.2.0`, where EESSI 2026.06 installs Python, `Python-bundle-PyPI` and `BeautifulSoup`, with the new `examples/stacks/eessi-python-gcccore.toml` policy, and the fixture robot holds the GCCcore-15.2.0 builds of Python 3.14.2 and `Python-bundle-PyPI` 2026.04. The numpy example stays on `foss/2026.1`, because `SciPy-bundle` is never on GCCcore. diff --git a/docs/orgmode/howto/pypi-extend.org b/docs/orgmode/howto/pypi-extend.org index 9908511e..cf030cef 100644 --- a/docs/orgmode/howto/pypi-extend.org +++ b/docs/orgmode/howto/pypi-extend.org @@ -30,7 +30,7 @@ Inspect does not need a robot. Plan does. eb-stack package inspect \ --source fixtures/foreign_ingest/pypi_bs4/pypi.json \ --format pypi \ - --toolchain foss/2026.1 \ + --toolchain GCCcore/15.2.0 \ --out-dir /tmp/bs4-inspect #+end_src @@ -45,19 +45,28 @@ package; later specs are additional run dependencies. Source ~env.sh~ from ~scripts/fetch-upstream-trees.sh~ first. ~EB_EASYCONFIGS~ is the develop easyconfigs tree. +Pick the toolchain the way EESSI does. A pure-Python package goes on +GCCcore, where EESSI 2026.06 installs Python, ~Python-bundle-PyPI~ and +~BeautifulSoup~, so the bs4 plan uses ~GCCcore/15.2.0~ and +~examples/stacks/eessi-python-gcccore.toml~. A package that needs numpy +needs ~SciPy-bundle~, which EESSI installs on ~gfbf/2026.1~; the numpy +example below uses ~foss/2026.1~, which includes it, and +~examples/stacks/eessi-python-extras.toml~. The policy's toolchain must +be the plan's ~--toolchain~. + #+begin_src bash eb-stack package plan \ --source fixtures/foreign_ingest/pypi_bs4/pypi.json \ --format pypi \ - --toolchain foss/2026.1 \ + --toolchain GCCcore/15.2.0 \ --easyconfigs fixtures/foreign_ingest/pypi_bs4/robot \ - --stack-policy examples/stacks/eessi-python-extras.toml \ + --stack-policy examples/stacks/eessi-python-gcccore.toml \ --out-dir /tmp/eb-stack/bundles/bs4 #+end_src The lock collapses ~soupsieve~ to ~Python-bundle-PyPI~. The emitted -recipe is ~PythonPackage~, depends on ~Python 3.13.1~ and -~Python-bundle-PyPI 2025.04~, and has no ~exts_list~. The checksum is +recipe is ~PythonPackage~, depends on ~Python 3.14.2~ and +~Python-bundle-PyPI 2026.04~, and has no ~exts_list~. The checksum is the one in the fixture. The plan's ~easyblock~ stays ~PythonBundle~; that class is what a multi-package overlay emits. A ~PythonBundle~ recipe is for a set installed together, not for a single package. diff --git a/examples/stacks/eessi-python-gcccore.toml b/examples/stacks/eessi-python-gcccore.toml new file mode 100644 index 00000000..2f9c8287 --- /dev/null +++ b/examples/stacks/eessi-python-gcccore.toml @@ -0,0 +1,22 @@ +schema_version = 1 +name = "eessi-python-gcccore" + +[toolchain] +name = "GCCcore" +version = "15.2.0" + +# Pure-Python packages sit on GCCcore, beside Python and Python-bundle-PyPI. +# A package that needs SciPy-bundle takes eessi-python-extras.toml instead. +# Lock the Python providers to the versions the target EESSI tree actually +# ships. Preferred pins may fall back; locked pins may not. +# Fill versions from `module --terse avail Python Python-bundle-PyPI`. + +# [[pins]] +# name = "Python" +# version_requirement = "==3.14.2" +# mode = "locked" +# +# [[pins]] +# name = "Python-bundle-PyPI" +# version_requirement = "==2026.04" +# mode = "locked" diff --git a/fixtures/foreign_ingest/pypi_bs4/robot/Python-3.13.1-GCCcore-14.2.0.eb b/fixtures/foreign_ingest/pypi_bs4/robot/Python-3.14.2-GCCcore-15.2.0.eb similarity index 56% rename from fixtures/foreign_ingest/pypi_bs4/robot/Python-3.13.1-GCCcore-14.2.0.eb rename to fixtures/foreign_ingest/pypi_bs4/robot/Python-3.14.2-GCCcore-15.2.0.eb index 57f4d7a7..947667fa 100644 --- a/fixtures/foreign_ingest/pypi_bs4/robot/Python-3.13.1-GCCcore-14.2.0.eb +++ b/fixtures/foreign_ingest/pypi_bs4/robot/Python-3.14.2-GCCcore-15.2.0.eb @@ -1,9 +1,9 @@ name = 'Python' -version = '3.13.1' +version = '3.14.2' homepage = 'https://python.org' description = "Test Python provider" -toolchain = {'name': 'foss', 'version': '2026.1'} +toolchain = {'name': 'GCCcore', 'version': '15.2.0'} dependencies = [ - ('binutils', '2.42'), + ('binutils', '2.45'), ] moduleclass = 'lang' diff --git a/fixtures/foreign_ingest/pypi_bs4/robot/Python-bundle-PyPI-2025.04-GCCcore-14.2.0.eb b/fixtures/foreign_ingest/pypi_bs4/robot/Python-bundle-PyPI-2026.04-GCCcore-15.2.0.eb similarity index 68% rename from fixtures/foreign_ingest/pypi_bs4/robot/Python-bundle-PyPI-2025.04-GCCcore-14.2.0.eb rename to fixtures/foreign_ingest/pypi_bs4/robot/Python-bundle-PyPI-2026.04-GCCcore-15.2.0.eb index 4c062b55..cb2ed499 100644 --- a/fixtures/foreign_ingest/pypi_bs4/robot/Python-bundle-PyPI-2025.04-GCCcore-14.2.0.eb +++ b/fixtures/foreign_ingest/pypi_bs4/robot/Python-bundle-PyPI-2026.04-GCCcore-15.2.0.eb @@ -1,10 +1,10 @@ name = 'Python-bundle-PyPI' -version = '2025.04' +version = '2026.04' homepage = 'https://example.invalid/python-bundle-pypi' description = "Test bundle providing soupsieve" -toolchain = {'name': 'foss', 'version': '2026.1'} +toolchain = {'name': 'GCCcore', 'version': '15.2.0'} dependencies = [ - ('Python', '3.13.1'), + ('Python', '3.14.2'), ] exts_list = [ ('soupsieve', '2.6'), diff --git a/llms-full.txt b/llms-full.txt index 5591be69..efa67ff3 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -1192,7 +1192,7 @@ Inspect does not need a robot. Plan does. eb-stack package inspect \ --source fixtures/foreign_ingest/pypi_bs4/pypi.json \ --format pypi \ - --toolchain foss/2026.1 \ + --toolchain GCCcore/15.2.0 \ --out-dir /tmp/bs4-inspect ``` @@ -1207,19 +1207,28 @@ package; later specs are additional run dependencies. Source `env.sh` from `scripts/fetch-upstream-trees.sh` first. `EB_EASYCONFIGS` is the develop easyconfigs tree. +Pick the toolchain the way EESSI does. A pure-Python package goes on +GCCcore, where EESSI 2026.06 installs Python, `Python-bundle-PyPI` and +`BeautifulSoup`, so the bs4 plan uses `GCCcore/15.2.0` and +`examples/stacks/eessi-python-gcccore.toml`. A package that needs numpy +needs `SciPy-bundle`, which EESSI installs on `gfbf/2026.1`; the numpy +example below uses `foss/2026.1`, which includes it, and +`examples/stacks/eessi-python-extras.toml`. The policy's toolchain must +be the plan's `--toolchain`. + ```bash eb-stack package plan \ --source fixtures/foreign_ingest/pypi_bs4/pypi.json \ --format pypi \ - --toolchain foss/2026.1 \ + --toolchain GCCcore/15.2.0 \ --easyconfigs fixtures/foreign_ingest/pypi_bs4/robot \ - --stack-policy examples/stacks/eessi-python-extras.toml \ + --stack-policy examples/stacks/eessi-python-gcccore.toml \ --out-dir /tmp/eb-stack/bundles/bs4 ``` The lock collapses `soupsieve` to `Python-bundle-PyPI`. The emitted -recipe is `PythonPackage`, depends on `Python 3.13.1` and -`Python-bundle-PyPI 2025.04`, and has no `exts_list`. The checksum is +recipe is `PythonPackage`, depends on `Python 3.14.2` and +`Python-bundle-PyPI 2026.04`, and has no `exts_list`. The checksum is the one in the fixture. The plan's `easyblock` stays `PythonBundle`; that class is what a multi-package overlay emits. A `PythonBundle` recipe is for a set installed together, not for a single package. diff --git a/skills/package-plan/SKILL.md b/skills/package-plan/SKILL.md index 366cc8a9..e403719c 100644 --- a/skills/package-plan/SKILL.md +++ b/skills/package-plan/SKILL.md @@ -11,9 +11,9 @@ Run this from the repository root. The fixture robot is enough. A full easybuild eb-stack package plan \ --source fixtures/foreign_ingest/pypi_bs4/pypi.json \ --format pypi \ - --toolchain foss/2026.1 \ + --toolchain GCCcore/15.2.0 \ --easyconfigs fixtures/foreign_ingest/pypi_bs4/robot \ - --stack-policy examples/stacks/eessi-python-extras.toml \ + --stack-policy examples/stacks/eessi-python-gcccore.toml \ --out-dir /tmp/bs4-plan ``` @@ -23,7 +23,7 @@ The command prints the paths it wrote. These files must exist: test -s /tmp/bs4-plan/package.plan.json test -s /tmp/bs4-plan/package.sbom.cdx.json test -s /tmp/bs4-plan/locks/default.lock.json -test -s /tmp/bs4-plan/easyconfigs/b/beautifulsoup4/beautifulsoup4-4.12.3-foss-2026.1.eb +test -s /tmp/bs4-plan/easyconfigs/b/beautifulsoup4/beautifulsoup4-4.12.3-GCCcore-15.2.0.eb ``` `--easyconfigs` and `--stack-policy` are required. Repeat `--easyconfigs` for an overlay. Later trees win on one name, version, toolchain, and versionsuffix. `--toolchain` is `name/version`. `--toolchain-version` alone defaults the name to `foss`. An empty `--toolchain-name` is rejected. `--source-checksum` is repeatable, once per source artifact, when the recipe has no digest. diff --git a/tests/doc_walkthrough.rs b/tests/doc_walkthrough.rs index 6ab280fc..968e61f9 100644 --- a/tests/doc_walkthrough.rs +++ b/tests/doc_walkthrough.rs @@ -297,11 +297,11 @@ fn foreign_plan_howtos_use_the_fixture_robots() { "--format", "pypi", "--toolchain", - "foss/2026.1", + "GCCcore/15.2.0", "--easyconfigs", "fixtures/foreign_ingest/pypi_bs4/robot", "--stack-policy", - "examples/stacks/eessi-python-extras.toml", + "examples/stacks/eessi-python-gcccore.toml", "--out-dir", ], &bs4, @@ -312,14 +312,38 @@ fn foreign_plan_howtos_use_the_fixture_robots() { String::from_utf8_lossy(&status.stderr) ); let recipe = std::fs::read_to_string( - bs4.join("easyconfigs/b/beautifulsoup4/beautifulsoup4-4.12.3-foss-2026.1.eb"), + bs4.join("easyconfigs/b/beautifulsoup4/beautifulsoup4-4.12.3-GCCcore-15.2.0.eb"), ) .unwrap(); assert!(recipe.contains("easyblock = 'PythonPackage'"), "{recipe}"); assert!(!recipe.contains("exts_list"), "{recipe}"); + assert!( + recipe.contains("dependencies = [('Python', '3.14.2'), ('Python-bundle-PyPI', '2026.04')]"), + "{recipe}" + ); let page = std::fs::read_to_string(root().join("docs/orgmode/howto/pypi-extend.org")).unwrap(); assert!(page.contains("fixtures/foreign_ingest/pypi_bs4/robot")); assert!(page.contains("easyblock = 'PythonPackage'") || page.contains("~PythonPackage~")); + // EESSI installs pure-Python packages on GCCcore, so the page plans bs4 there. + for command in [ + "eb-stack package inspect \\\n --source fixtures/foreign_ingest/pypi_bs4/pypi.json \\\n \ + --format pypi \\\n --toolchain GCCcore/15.2.0 \\\n", + "eb-stack package plan \\\n --source fixtures/foreign_ingest/pypi_bs4/pypi.json \\\n \ + --format pypi \\\n --toolchain GCCcore/15.2.0 \\\n \ + --easyconfigs fixtures/foreign_ingest/pypi_bs4/robot \\\n \ + --stack-policy examples/stacks/eessi-python-gcccore.toml \\\n", + ] { + assert!(page.contains(command), "pypi-extend.org lacks:\n{command}"); + } + assert!(page.contains("~Python 3.14.2~") && page.contains("~Python-bundle-PyPI 2026.04~")); + let skill = std::fs::read_to_string(root().join("skills/package-plan/SKILL.md")).unwrap(); + for line in [ + " --toolchain GCCcore/15.2.0 \\\n", + " --stack-policy examples/stacks/eessi-python-gcccore.toml \\\n", + "beautifulsoup4/beautifulsoup4-4.12.3-GCCcore-15.2.0.eb\n", + ] { + assert!(skill.contains(line), "package-plan skill lacks {line:?}"); + } let cran = tmp.path().join("cran"); let status = run_to(