Repository to build and test PISM conda packages
Get pism-conda source from GitHub:
git clone [email protected]:pism/pism-conda.git
cd pism-conda
Now create a conda environment named pism-dev. This installs a barebones environment suitable to build staged-recipies.
conda env create -f environment-conda.yml
conda activate pism-conda
cd ..
mkdir -p pism-staged-recipies
git clone [email protected]:pism/staged-recipes.git . || (git checkout pism-channel && git pull)
cd pism-staged-recipies
pixi install
The pism-channel currently has packages for yaxt, yac, and pism (stable). Change into the recipies/package directory, where package is the package you want to update. Edit the build.sh and meta.yml files.
To bump the version of, e.g., yac, set the new version number in meta.yml:
{% set version = "3.7.0" %}
Download the tarball and extract sha256:
openssl sha256 yac-v3.7.0.tar.gz
Update the sha256 in meta.yml.
Before building, lint your changes:
pixi run lint
Depending on your architecture, run
pixi run build-linux
or
pixi run build-osx
You may need to clean your path first, though
export PATH=/Users/andy/miniforge3/envs/pism-conda/bin:/usr/bin:/bin:/usr/sbin:/sbin
unset PYTHONPATH
unset CONDA_PREFIX
anaconda upload build_artifacts/linux-64/*.conda
or
anaconda upload build_artifacts/osx-arm64/*.conda
Say you want to create a development environment that installs all prerequisites from conda and compiles PISM from sources. Build from main branch
bash ~/base/pism-conda/build-pism-dbg.sh
Or build a specific branch/tag
bash ~/base/pism-conda/build-pism-dbg.sh my-branch
After building, activate with:
mamba activate pism-dbg
export PISM_DIR=$HOME/pism-dbg
export PYTHONPATH=$HOME/pism-dbg/lib/python3.13/site-packages:$PYTHONPATH
export PATH=$HOME/pism-dbg/bin:$PATH