Create and run setup.py
PyCharm provides an action that helps create setup.py script, intended for building, distributing, and installing modules. Once setup.py is created, the corresponding action becomes disabled
Create setup.py
In the Project tool window, select the package. Then, go to in the main menu.
In the New Setup Script dialog, specify the package name, its version, the author, the author email, the package description, and any licence details.
Click OK when ready. PyCharm creates setup.py and opens it in the editor.
When you work with any project that comes setup.py, you can run some tasks to build, install, and distribute packages described within the setup.py file. PyCharm helps you create the command-line sequence of the following format:
Run a setup.py task
In the main menu, go to .
In the Enter setup.py task name dialog, type the letters of the task names.
In the Command Line field, enter the argument of the task to execute.
You can leave this field empty if no arguments are needed.
Once you click OK, the command line begins to execute in the Run tool window.
For more information about the setup.py command arguments, refer to Building and Distributing Packages with Setuptools.