Skip to content

Commit

Permalink
build: do not generate setup.py by default
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
abn committed Apr 1, 2022
1 parent d6d33de commit 8442d2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/poetry/core/json/schemas/poetry-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/core/packages/project_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 8442d2e

Please sign in to comment.