开发者

setuptools entry_points. Installing executable to /usr/sbin

开发者 https://www.devze.com 2023-04-07 09:11 出处:网络
I have a setup.py script, that has entry_points defined like this: entry_points = { \'console_scripts\': [

I have a setup.py script, that has entry_points defined like this:

entry_points = {
    'console_scripts': [
                        'gun = gun.sync:main'
                       ]
                },

This installs the executable into /usr/bin. Is there any way I can tell entry_points to install it to /usr/sb开发者_开发知识库in instead?


No. You have to pass the --script-dir option to easy_install to specify that.

(You could add it to your project's setup.cfg file, but it's not recommended because it'll surprise people who have configured their Python installation to install scripts to some other location... and even if you do it, it'll only take effect for users who actually run your setup.py. Most other installation tools will ignore a script path specified in a project's setup.cfg.)

0

精彩评论

暂无评论...
验证码 换一张
取 消