From 49b6d171a23bdfc7a7b2d8472a45173799f8b497 Mon Sep 17 00:00:00 2001 From: ades Date: Tue, 16 Nov 2021 00:04:34 +0100 Subject: [PATCH] Update commands for installing extra deps --- README.md | 37 ++++++++++++++++++------------------- setup.cfg | 3 +++ tox.ini | 19 +++++++------------ 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index ae34412..6c16f8d 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ you provide us your `moderngl.Context`. ## Install ```bash -pip install moderngl-window +$ pip install moderngl-window ``` ## Supported Platforms @@ -67,13 +67,13 @@ Test.run() Run the example with different window backends: ```bash -python test.py --window pyglet -python test.py --window pygame2 -python test.py --window glfw -python test.py --window sdl2 -python test.py --window pyside2 -python test.py --window pyqt5 -python test.py --window tk +$ python test.py --window pyglet +$ python test.py --window pygame2 +$ python test.py --window glfw +$ python test.py --window sdl2 +$ python test.py --window pyside2 +$ python test.py --window pyqt5 +$ python test.py --window tk ``` `WindowConfig` classes are the simplest way to get started without knowing @@ -88,9 +88,8 @@ We assume the user knows how to handle virtualenvs. # Install the package in editable mode $ pip install -e . -# Set up and dev requirements -pip install -r requirements.txt -pip install -r tests/requirements.txt +# Install test and development requirements +$ pip install -e .[tests] ``` ## Running Tests @@ -98,19 +97,19 @@ pip install -r tests/requirements.txt Tests are set up with `tox` running pytest with coverage and flake8. ```bash -pip install -r tests/requirements.txt -tox -e py36 -tox -e py37 -tox -e py38 -tox -e py39 -tox -e pep8 +$ pip install -e .[tests] +$ tox -e py36 +$ tox -e py37 +$ tox -e py38 +$ tox -e py39 +$ tox -e pep8 ``` ## Building Docs ```bash -pip install -r docs/requirements.txt -python setup.py build_sphinx +$ pip install -e .[docs] +$ sphinx-build -b html docs docs/_build ``` ## Contributing diff --git a/setup.cfg b/setup.cfg index daf4b53..1900b2f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,3 +63,6 @@ docs = sphinx-rtd-theme sphinxcontrib-napoleon doc8 + +[coverage:run] +source = moderngl_window diff --git a/tox.ini b/tox.ini index 7fae1fc..64bd17f 100644 --- a/tox.ini +++ b/tox.ini @@ -4,35 +4,30 @@ [tox] skipsdist = True envlist = - py36 - py37 py38 py39 py310 + py311 pep8 [gh-actions] python = - 3.5: py35 - 3.6: py36 - 3.7: py37 3.8: py38 - pep8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 [testenv] usedevelop = True basepython = - py36: python3.6 - py37: python3.7 py38: python3.8 py39: python3.9 py310: python3.10 + py311: python3.11 -deps = - -r{toxinidir}/requirements.txt - -r{toxinidir}/tests/requirements.txt +extras = tests commands = - coverage run --source=moderngl_window -m pytest tests/ + coverage run -m pytest tests/ coverage report [testenv:pep8]