diff --git a/poetry/core/factory.py b/poetry/core/factory.py index 22b892720..d5c2fa0d4 100644 --- a/poetry/core/factory.py +++ b/poetry/core/factory.py @@ -63,6 +63,8 @@ def create_poetry(self, cwd=None): # type: (Optional[Path]) -> Poetry package.keywords = local_config.get("keywords", []) package.classifiers = local_config.get("classifiers", []) + package.private = local_config.get("private", False) + if "readme" in local_config: package.readme = Path(poetry_file.parent) / local_config["readme"] @@ -94,6 +96,7 @@ def create_poetry(self, cwd=None): # type: (Optional[Path]) -> Poetry package.add_dependency(name, constraint, category="dev") extras = local_config.get("extras", {}) + for extra_name, requirements in extras.items(): package.extras[extra_name] = [] diff --git a/poetry/core/json/schemas/poetry-schema.json b/poetry/core/json/schemas/poetry-schema.json index 8397ba8ab..38d8e0155 100644 --- a/poetry/core/json/schemas/poetry-schema.json +++ b/poetry/core/json/schemas/poetry-schema.json @@ -173,6 +173,10 @@ "description": "The full url of the custom url." } } + }, + "private": { + "type": "boolean", + "description": "Mark as private. Turn off the default publish behavior." } }, "definitions": {