Skip to content

Managing mepo via rye

Purnendu Chakraborty edited this page Aug 9, 2024 · 9 revisions

We use rye to manage mepo.

Install rye

curl -sSf https://rye.astral.sh/get | bash

This would install the latest Python that is available at the time. For more details, see https://rye.astral.sh/guide/installation

Checkout mepo

git clone git@github.com:GEOS-ESM/mepo.git
cd mepo

Manage via rye

Print the current state of the project

rye show

This reads the project's pyproject.toml and would output something like

roject: mepo
path: /Users/pchakrab/Workspace/tmp/mepo
venv: /Users/pchakrab/Workspace/tmp/mepo/.venv
target python: 3.9
venv python: cpython@3.9.19
virtual: false
configured sources:
  default (index: https://pypi.org/simple/)

Virtualenv

rye sync

This would download the targeted Python version, create the virtualenv .venv, install dependencies, and install the executable mepo in .venv/bin

source .venv/bin/activate

Build (for distribution)

Update version number in pyproject.toml and run

rye build

This creates mepo-2.0.0-py3-none-any.whl and mepo-2.0.0.tar.gz in the dist directory

Publish (to pypi.org)

rye publish
Clone this wiki locally