Skip to content

Commit 8442d2e

Browse files
committed
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 python-poetry#26, to `true` in `pyproject.toml`.
1 parent d6d33de commit 8442d2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/poetry/core/json/schemas/poetry-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@
666666
"generate-setup-file": {
667667
"type": "boolean",
668668
"description": "Generate and include a setup.py file in sdist.",
669-
"default": true
669+
"default": false
670670
},
671671
"script": {
672672
"$ref": "#/definitions/build-script"

src/poetry/core/packages/project_package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ def urls(self) -> dict[str, Any]:
7272
return urls
7373

7474
def build_should_generate_setup(self) -> bool:
75-
return self.build_config.get("generate-setup-file", True)
75+
return self.build_config.get("generate-setup-file", False)

0 commit comments

Comments
 (0)