Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions changelog.d/+pypi-gcccore.doc.md
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 14 additions & 5 deletions docs/orgmode/howto/pypi-extend.org
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
22 changes: 22 additions & 0 deletions examples/stacks/eessi-python-gcccore.toml
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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'),
Expand Down
19 changes: 14 additions & 5 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions skills/package-plan/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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.
Expand Down
30 changes: 27 additions & 3 deletions tests/doc_walkthrough.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down
Loading