开发者

setuptools entry_points. Installing executable to /usr/sbin

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜