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.)
精彩评论