diff --git a/.github/workflows/freebsd.yaml b/.github/workflows/freebsd.yaml index 86b5c59..1abb7c7 100644 --- a/.github/workflows/freebsd.yaml +++ b/.github/workflows/freebsd.yaml @@ -21,16 +21,10 @@ jobs: python3.11 -m venv .venv . .venv/bin/activate pip install --upgrade pip - # Remove problematic python packages: - # - bpython: unnecessary, depends on greenlet and thus on a recent C++ compiler - # - ruff: depends on a Rust compiler - # - twine: unnecessary, depends on a Rust compiler - sed -i '' '/bpython/d; /ruff/d; /twine/d' requirements.txt - pip install -r requirements.txt + pip install -e .[bsd-ci] # no ruff, no ruff check mypy src/moulti pylint src/moulti - pip install -e . # This runs all tests except: # - test_diff_with_delta (requires delta 0.18.x) pytest -v diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d29e08e..91f8773 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -26,12 +26,11 @@ jobs: with: python-version: ${{matrix.python-version}} cache: pip - - run: pip install -r requirements.txt + - run: pip install -e .[ci] - run: ruff check src/moulti - run: mypy src/moulti - run: pylint src/moulti - run: ruff check tests - - run: pip install -e . # This runs all tests except: # - test_diff_with_delta (requires delta 0.18.x) - run: pytest -v diff --git a/.github/workflows/netbsd.yaml b/.github/workflows/netbsd.yaml index e2b9c5d..d584e4c 100644 --- a/.github/workflows/netbsd.yaml +++ b/.github/workflows/netbsd.yaml @@ -24,16 +24,10 @@ jobs: python3.11 -m venv .venv . .venv/bin/activate pip install --upgrade pip - # Remove problematic python packages: - # - bpython: unnecessary, depends on greenlet and thus on a recent C++ compiler - # - ruff: depends on a Rust compiler - # - twine: unnecessary, depends on a Rust compiler - sed -i '/bpython/d; /ruff/d; /twine/d' requirements.txt - pip install -r requirements.txt + pip install -e .[bsd-ci] # no ruff, no ruff check mypy src/moulti pylint src/moulti - pip install -e . # This runs all tests except: # - test_diff_with_delta (requires delta 0.18.x) pytest -v diff --git a/.github/workflows/openbsd.yaml b/.github/workflows/openbsd.yaml index 49b8947..4ae65f8 100644 --- a/.github/workflows/openbsd.yaml +++ b/.github/workflows/openbsd.yaml @@ -21,16 +21,10 @@ jobs: python3.11 -m venv .venv . .venv/bin/activate pip install --upgrade pip - # Remove problematic python packages: - # - bpython: unnecessary, depends on greenlet and thus on a recent C++ compiler - # - ruff: depends on a Rust compiler - # - twine: unnecessary, depends on a Rust compiler - sed -i '/bpython/d; /ruff/d; /twine/d' requirements.txt - pip install -r requirements.txt + pip install -e .[bsd-ci] # no ruff, no ruff check mypy src/moulti pylint src/moulti - pip install -e . # This runs all tests except: # - test_diff_with_delta (requires delta 0.18.x) pytest -v diff --git a/pyproject.toml b/pyproject.toml index e6dfd32..52e8176 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,43 @@ classifiers = [ "Topic :: Utilities", ] +[project.optional-dependencies] +tinker = [ + "bpython", + "textual-dev", +] +check-py = [ + "mypy", + "pylint", +] +check-rust = [ + "ruff", +] +check = [ + "moulti[check-py,check-rust]", +] +test = [ + "pytest", + "pytest-asyncio", + "pytest-forked", + "pytest-textual-snapshot @ git+https://github.com/textualize/pytest-textual-snapshot@19b2607c93b898cc67c6f9299f6236af5e994375", + "pytest-xdist", +] +release = [ + "build", + "twine", +] +dev = [ + "moulti[tinker,check,test,release]", +] +ci = [ + "moulti[check,test]", +] +# Installing ruff on *BSD systems requires a Rust compiler + time + energy: +bsd-ci = [ + "moulti[check-py,test]", +] + [project.urls] Homepage = "https://github.com/xavierog/moulti/?tab=readme-ov-file#moulti" Documentation = "https://github.com/xavierog/moulti/blob/master/Documentation.md" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e6b9522..0000000 --- a/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -argcomplete -bpython -build -mypy -pylint -pyperclip -pytest -pytest-asyncio -pytest-forked -git+https://github.com/Textualize/pytest-textual-snapshot@19b2607c93b898cc67c6f9299f6236af5e994375 -pytest-xdist -ruff -textual-dev -textual==1.0.* -twine -unidiff