frontend/*: move to artiq.frontend, make entry_points

* solves the trouble of having to setup PATH and PYTHONPATH in a project
  specific way and keep them changing
* works well with virtualenvs
* works under windows where the shebang is meaningless
* works if your python is not named "python3"

* can use "pip3 install --user --editable ."
  * creates an egg-link in ~/.local/share/... pointing to $PWD
  * generates the scripts and copies them to ~/.local/bin which is likely
    already in your $PATH
  * analogously under windows

* or call scripts as "python3 -m artiq.frontend.master"
This commit is contained in:
Robert Jördens 2015-01-16 17:11:21 -07:00 committed by Sebastien Bourdeauducq
parent 0dc647773f
commit 6cc3a9d973
11 changed files with 13 additions and 1 deletions

View File

View File

@ -26,5 +26,17 @@ setup(
(os.path.join("artiq", "gui"),
[os.path.join("artiq", "gui", "icon.png")])],
ext_modules=[],
scripts=glob(os.path.join("frontend", "*.py"))
entry_points={
"console_scripts": [
"artiq_client=artiq.frontend.client:main",
"artiq_ctlid=artiq.frontend.ctlid:main",
"artiq_gui=artiq.frontend.gui:main",
"artiq_master=artiq.frontend.master:main",
"artiq_run=artiq.frontend.run:main",
"lda_client=artiq.frontend.lda_client:main",
"lda_controller=artiq.frontend.lda_controller:main",
"pdq2_client=artiq.frontend.pdq2_client:main",
"pdq2_controller=artiq.frontend.pdq2_controller:main",
],
}
)