Defining commands
Packaging the abq_data_entry module alone won't make our application executable after installation. Currently, we run our application from abq_data_entry.py, which is outside the abq_data_entry module that we're packaging; we could include this file in MANIFEST.in, but then the user would have to hunt it down somewhere in their Python libraries directory to run it.
The setuptools library offers a better way to add executable commands in our package using the entry_points argument. Entry points are ways for external environments to access our code. One particular entry point, console_scripts, defines a list of module functions that will be mapped to external commands. When the package is installed, setuptools will create ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access