Difference between entry_points/console_scripts and scripts in setup.py?

前端 未结 4 1318
情歌与酒
情歌与酒 2020-12-12 19:16

There are basically two ways to install Python console scripts to my path by setup.py:

setup(
    ...
    entry_points = {
        \'console_scr         


        
4条回答
  •  猫巷女王i
    2020-12-12 20:14

    One key difference between these two ways of creating command line executables is that with the setuptools approach (your first example), you have to call a function inside of the script -- in your case this is the func inside of your module. However, in the distutils approach (your second example) you call the script directly (which allows being listed with or without an extension).

提交回复
热议问题