Skip to content

Commit

Permalink
Switch to venv and pip setup instead of conda.
Browse files Browse the repository at this point in the history
This better aligns with the max+mojo docs for installation.
  • Loading branch information
guidorice committed Jul 20, 2024
1 parent 6e90ee7 commit 70ccb82
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 24 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ does not have any awareness of Mojo source or package structure, `pytest` is ext

1. Create your Mojo tests according to the manual: https://docs.modular.com/mojo/tools/testing .

2. Install `pytest` and `pytest-mojo` plugin into your project
with `pip install git+https://github.com/guidorice/mojo-pytest.git`, or with the Conda
[environment.yaml](./environment.yaml) (recommended)
2. Install `pytest` and `pytest-mojo` plugin using the [pyproject](./pyproject.toml) file:

```shell
# conda installation example
$ conda env create -f environment.yaml -p ./env
$ conda activate ./env
# (optional) create and activate a virtualenv
python3 -m venv venv/
source venv/bin/activate

# install from github
pip install git+https://github.com/guidorice/mojo-pytest.git
# or install from cloned repository
pip install .

# verify pytest and the Mojo plugin are installed
$ pytest --version
Expand Down
9 changes: 0 additions & 9 deletions environment.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[tool.poetry]
name = "pytest-mojo"
version = "24.4.0"
description = "Mojo🔥 language test runner plugin for pytest. (aka pytest-mojo)"
authors = ["Alex G Rice <alex@ricegeo.dev>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/guidorice/mojo-pytest"
packages = [
{ include = "pytest_mojo" },
]

[tool.poetry.dependencies]
python = "^3.11"
pytest = "*"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.plugins.pytest11]
mojo = "pytest_mojo.plugin"
9 changes: 0 additions & 9 deletions setup.py

This file was deleted.

0 comments on commit 70ccb82

Please sign in to comment.