nismod / snail

spatial networks impact assessment library 🐌
https://nismod.github.io/snail/
MIT License
9 stars 1 forks source link

Package distribution #42

Closed tomalrussell closed 2 years ago

tomalrussell commented 2 years ago

Package for pip and possibly conda (conda-forge). Include an automated release step in GitHub Actions.

Any anticipated difficulties around building/distributing the CPP library?

tomalrussell commented 2 years ago

Inital source-dist release at https://pypi.org/project/nismod-snail/

git log v0.1..HEAD --oneline  # check changelog
git tag -a v0.2.0 # create annotated tag
git describe  # check version
python -m build  # build source distribution and wheel
twine upload dist/*.tar.gz  # upload source distribution

Workflow for releases and wheels under development at https://github.com/nismod/snail/blob/master/.github/workflows/package.yml using cibuildwheel based on pybind/python_example

tomalrussell commented 2 years ago

Looks like CI workflow works :tada:

https://github.com/nismod/snail/runs/4180773709?check_suite_focus=true

pip install nismod-snail pulls down a wheel (no build step) and passes the tests!