diff --git a/README.md b/README.md index 8336614..dcbf632 100644 --- a/README.md +++ b/README.md @@ -224,8 +224,9 @@ by running; ```bash # Install in current environment. # Recommend to have virtual environment installed at .venv path. -pip install -r requirements-dev.txt -pip install -e . +# Dependency groups need pip 25.1+. +python -m pip install "pip>=25.1" +pip install -e . --group dev ``` From there to run the basic tests run; diff --git a/build_helpers/lib.sh b/build_helpers/lib.sh index 7acb9c1..98b5c14 100755 --- a/build_helpers/lib.sh +++ b/build_helpers/lib.sh @@ -64,7 +64,9 @@ lib::setup::python_requirements() { --verbose echo "Installing dev dependencies" - python -m pip install -r requirements-dev.txt + # --group needs pip 25.1+ (PEP 735) + python -m pip install "pip>=25.1" + python -m pip install --group dev if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then echo "::endgroup::" diff --git a/pyproject.toml b/pyproject.toml index e55ba59..9536557 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,22 @@ kerberos = ["pyspnego[kerberos]"] [project.urls] homepage = "https://github.com/jborean93/smbprotocol" +[dependency-groups] +test = [ + "pytest", + "pytest-cov", + "pytest-mock", +] +lint = [ + "black == 26.3.1", + "isort == 8.0.1", + "pre-commit", +] +dev = [ + {include-group = "test"}, + {include-group = "lint"}, +] + [tool.setuptools.packages.find] where = ["src"] diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 4e74bab..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,9 +0,0 @@ -black == 26.3.1 -build -cryptography >= 2.0 -isort == 8.0.1 -pre-commit -pyspnego -pytest -pytest-cov -pytest-mock