From c92db01640fe428fda21e64f30b2c14227bc6b54 Mon Sep 17 00:00:00 2001 From: John Paulett Date: Sun, 21 Aug 2022 16:44:33 -0400 Subject: [PATCH] Make yaml an optional dependency since only for dependabot. Refs equium-io/mazel#1. --- Makefile | 2 +- poetry.lock | 7 +++++-- pyproject.toml | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a892af4..735701b 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ poetry.lock: pyproject.toml > touch -c poetry.lock .venv: poetry.lock poetry.toml -> $(POETRY) install $(POETRY_INSTALL_OPTIONS) +> $(POETRY) install --extras "yaml" # In case .venv existed before poetry.lock, update the target > touch -c .venv diff --git a/poetry.lock b/poetry.lock index 0a073b6..a6e4d17 100644 --- a/poetry.lock +++ b/poetry.lock @@ -320,7 +320,7 @@ name = "ruamel.yaml" version = "0.16.13" description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" category = "main" -optional = false +optional = true python-versions = "*" [package.extras] @@ -474,10 +474,13 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] secure = ["ipaddress", "certifi", "idna (>=2.0.0)", "cryptography (>=1.3.4)", "pyOpenSSL (>=0.14)"] brotli = ["brotlipy (>=0.6.0)", "brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +[extras] +yaml = ["ruamel.yaml"] + [metadata] lock-version = "1.1" python-versions = "~3.10" -content-hash = "43910c882b9029e7bfddcdad2c32c2b7c0982a5bc8122946096b96b57ea3a3a7" +content-hash = "56aa6246adec66b854cf3aa9053fa2bf210e6ddf0afd6c6ff15e1761bd592d13" [metadata.files] alabaster = [ diff --git a/pyproject.toml b/pyproject.toml index ab6b2aa..9fdf8fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,8 +11,7 @@ readme = "README.md" python = "~3.10" tomlkit = "^0.11.0" click = "^8.1.3" -# yaml only for `mazel contrib dependabot` -"ruamel.yaml" = "^0.16.10" +"ruamel.yaml" = { version = "^0.16.10", optional = true } [tool.poetry.dev-dependencies] Sphinx = "^5.1.1" @@ -26,6 +25,10 @@ flake8-fixme = "^1.1.1" [tool.poetry.scripts] mazel = 'mazel.main:cli' +[tool.poetry.extras] +# yaml only for `mazel contrib dependabot` +yaml = ["ruamel.yaml"] + [build-system] requires = ["poetry-core>=1.0.8"] build-backend = "poetry.core.masonry.api"