Skip to content

[cli] Initialize Python application without setup.py #9135

@alexpulver

Description

@alexpulver

cdk init --language python generates setup.py file, and requirements.txt file with -e ., that installs the project in editable mode (i.e. setuptools “develop mode”) from local path. This approach is used for distributing Python code to developers - a reusable construct in CDK case. CDK application is not a reusable construct, hence shouldn't have setup.py, and only list its direct dependencies in requirements.txt.

Use Case

Make cdk init --language python scaffolding more aligned with Python guidance on packaging applications as compared to packaging libraries and tools

Proposed Solution

Remove setup.py and -e . from requirements.txt when running cdk init --language python

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

Labels

effort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdp2package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions