From 8442d2e2a91de0fd45be4ff6cf8f99255857f9ce Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Fri, 1 Apr 2022 23:02:26 +0200 Subject: [PATCH] build: do not generate setup.py by default This is the first step in removing setup file generation from Poetry projects. With this change, projects that require a setup.py to be generated when a build script is used needs to explicitly set `tool.poetry.build.generate-setup-file`, introduced in #26, to `true` in `pyproject.toml`. --- src/poetry/core/json/schemas/poetry-schema.json | 2 +- src/poetry/core/packages/project_package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/poetry/core/json/schemas/poetry-schema.json b/src/poetry/core/json/schemas/poetry-schema.json index 1a9484431..c499353cc 100644 --- a/src/poetry/core/json/schemas/poetry-schema.json +++ b/src/poetry/core/json/schemas/poetry-schema.json @@ -666,7 +666,7 @@ "generate-setup-file": { "type": "boolean", "description": "Generate and include a setup.py file in sdist.", - "default": true + "default": false }, "script": { "$ref": "#/definitions/build-script" diff --git a/src/poetry/core/packages/project_package.py b/src/poetry/core/packages/project_package.py index b36985e16..5322c0613 100644 --- a/src/poetry/core/packages/project_package.py +++ b/src/poetry/core/packages/project_package.py @@ -72,4 +72,4 @@ def urls(self) -> dict[str, Any]: return urls def build_should_generate_setup(self) -> bool: - return self.build_config.get("generate-setup-file", True) + return self.build_config.get("generate-setup-file", False)