diff --git a/README.md b/README.md index dc3c3c8..bec8854 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/environment.yaml b/environment.yaml deleted file mode 100644 index dbaa0b0..0000000 --- a/environment.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: mojo-pytest -channels: - - defaults -dependencies: - - python=3.12.* - - pip - - pip: - - pytest>=8.2.* - - git+https://github.com/guidorice/mojo-pytest.git diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..538a28d --- /dev/null +++ b/pyproject.toml @@ -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 "] +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" diff --git a/setup.py b/setup.py deleted file mode 100644 index bf12aaf..0000000 --- a/setup.py +++ /dev/null @@ -1,9 +0,0 @@ -from setuptools import find_packages, setup - -setup( - name="pytest-mojo", - version="24.4.0", - packages=find_packages(), - entry_points={"pytest11": ["mojo = pytest_mojo.plugin"]}, - install_requires=["pytest"], -)