You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [update] Bump the package to the current version included in Spack
* [doc] Explain the release cycle of spack packages better
* [new version] add v2.3.0.1 to Spack recipe
* [ci][fix] update CI workflow for testing the bindings
* [ci] print binding version at end of workflow
Copy file name to clipboardExpand all lines: spack/README.md
+34-1Lines changed: 34 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,40 @@ The workflow `build-spack-pyprecice-deps` in `.github/workflows/build-env.yml` c
8
8
9
9
The workflow `build_spack` in `.github/workflows/build-spack.yml` uses the image `precice/ci-spack-pyprecice-deps-1804` to reduce build time. The workflow uses the `package.py` from this repository to build the latest version of the bindings and run a small test on this version.
10
10
11
-
## When a new spack release is necessary
11
+
## When a new Spack release is necessary
12
12
13
13
* Add checksum of newest version(s) to https://github.com/precice/python-bindings/blob/develop/spack/repo/packages/py-pyprecice/package.py. You can get checksum for any released version by running `spack checksum py-pyprecice`.
14
+
* Check whether the new release works locally. You can add the Spack repo in this repository and do the following:
15
+
1. Add the repository to your Spack installation if you have not done that before. You can check the repositories available with your Spack installation via `spack repo list`. If there is a repository called `pyprecice.test`, check whether it points to the correct path. The correct path is the `spack/repo` directory of python-bindings repository. If the repository is missing, add it via
16
+
```bash
17
+
spack repo add ${REPOSITORY_ROOT}/spack/repo
18
+
```
19
+
2. Build the new python bindings. Usually, we use a new Spack environment. This is created and loaded via
20
+
```
21
+
spack env create pyprecicetest-VERSIONNUMBER
22
+
spack env activate -p pyprecicetest-VERSIONNUMBER
23
+
spack
24
+
```
25
+
Note that the dots `.` in the version number must be replaced by underscores or similar.
26
+
3. We add the `py-pyprecice` package from our repository to the environment via
This ensures that one uses the local repository which has the namespace `pyprecice.test` when installing `py-precice`.
31
+
4. Concretize the software packages
32
+
```
33
+
spack concretize -f
34
+
```
35
+
and check whether everything looks good. You might want to edit the environment of the Spack environment (the `spack.yaml` file) and enforce combined concretization by adding `concretization: together` at the end of the file. You might want to double check whether the correct repository is used by calling
36
+
```
37
+
spack spec -N py-pyprecice@VERSIONNUMBER
38
+
```
39
+
It will print the concretization and prefixes each packages with the repository it will be installed from.
40
+
5. Run `spack install` to actually install the package.
41
+
6. If the installation went through, check the installation by running `python3 -c "import precice; print(precice.__version__)"`. This should print the version number of the Python bindings you have installed. *Note*: In order to make the bindings available one might have to reload the environment via ```
42
+
despacktivate
43
+
spack env activate -p pyprecicetest-VERSIONNUMBER
44
+
```
45
+
7. Ideally one runs the solverdummy with the freshly installed Python bindings.
14
46
* Use `package.py` together with the patches provided in `python-bindings/spack/repo/packages/py-pyprecice` to [create a pull request for Spack](https://github.com/spack/spack/compare) and submit the new release.
47
+
* After the pull request in the Spack repository is merged, merge the current package configuration into the repository of the Python bindings if necessery.
0 commit comments