Question
How to create its own setup.py template and put it in the menu Tools/Create setup.py in PyCharm?
Answer
In PyCharm 2026.1, the Tools | Create setup.py option generates the file using a built-in file template named "Setup Script." To customize this template follow these steps:
- Go to Settings | Editor | File and Code Templates.
- Open the Files tab and select "Setup Script."
- Replace the body of the template with the customized
setup.pycontent you want. - Click OK to save your changes.
The default template includes placeholders that PyCharm automatically fills in. These placeholders include:
$Package_name$Version$Author$Author_Email$License$URL$Description
These placeholders can be removed based on requirements. Standard variables such as $USER and $DATE also work and can be used.
Comments
0 comments
Please sign in to leave a comment.