setup.py and adding file to /bin/

后端 未结 4 1508
你的背包
你的背包 2020-12-07 15:42

I can\'t figure out how to make setup.py add a scrip to the the user\'s /bin or /usr/bin or whatever.

E.g., I\'d like to add a

4条回答
  •  不思量自难忘°
    2020-12-07 16:22

    There are two ways in order to get a working command line tool from setuptools and PyPI infrastructure:

    1. The "scripts" Keyword Argument
      This allows the command-line execution of everything you want, it can be a Python script, a shell script or something completely different.
    2. The "console_scripts" Entry Point
      This allows Python functions (not scripts!) to be directly registered as command-line accessible tools.

提交回复
热议问题