From 9420554d2b550bd89e0939f33e0b9ff24d7ff2cd Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Fri, 6 Feb 2015 18:37:35 +0100 Subject: [PATCH] WIP: let GUI be optional at install time --- conda/artiq/bld.bat | 1 + conda/artiq/build.sh | 2 +- conda/artiq/meta.yaml | 2 +- setup.py | 30 +++++++++++++++++------------- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/conda/artiq/bld.bat b/conda/artiq/bld.bat index e104111df..d1604ee7b 100644 --- a/conda/artiq/bld.bat +++ b/conda/artiq/bld.bat @@ -1 +1,2 @@ +set ARTIQ_GUI=0 "%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt diff --git a/conda/artiq/build.sh b/conda/artiq/build.sh index 3786386a7..5b5c44fa8 100755 --- a/conda/artiq/build.sh +++ b/conda/artiq/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -$PYTHON setup.py install --single-version-externally-managed --record=record.txt +ARTIQ_GUI=1 $PYTHON setup.py install --single-version-externally-managed --record=record.txt diff --git a/conda/artiq/meta.yaml b/conda/artiq/meta.yaml index e904bdb02..904afc8e6 100644 --- a/conda/artiq/meta.yaml +++ b/conda/artiq/meta.yaml @@ -12,7 +12,7 @@ build: entry_points: - artiq_client = artiq.frontend.artiq_client:main - artiq_ctlid = artiq.frontend.artiq_ctlid:main - - artiq_gui = artiq.frontend.artiq_gui:main + - artiq_gui = artiq.frontend.artiq_gui:main # [not win] - artiq_master = artiq.frontend.artiq_master:main - artiq_run = artiq.frontend.artiq_run:main - lda_client = artiq.frontend.lda_client:main diff --git a/setup.py b/setup.py index a6b2672c9..bf51a65ea 100755 --- a/setup.py +++ b/setup.py @@ -8,8 +8,23 @@ requirements = [ "sphinx", "sphinx-argparse", "pyserial", "numpy", "scipy", "python-dateutil", "prettytable", "h5py" ] -if os.name != 'nt': +scripts = [ + "artiq_client=artiq.frontend.artiq_client:main", + "artiq_ctlid=artiq.frontend.artiq_ctlid:main", + "artiq_ctlmgr=artiq.frontend.artiq_ctlmgr:main", + "artiq_master=artiq.frontend.artiq_master:main", + "artiq_run=artiq.frontend.artiq_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", + ] + +if os.getenv("ARTIQ_GUI") == "1": requirements += ["pygobject", "gbulb", "cairoplot"] + scripts += [ + "artiq_gui=artiq.frontend.artiq_gui:main" + ] setup( @@ -33,17 +48,6 @@ setup( package_data={"artiq": [os.path.join("gui", "icon.png")]}, ext_modules=[], entry_points={ - "console_scripts": [ - "artiq_client=artiq.frontend.artiq_client:main", - "artiq_ctlid=artiq.frontend.artiq_ctlid:main", - "artiq_ctlmgr=artiq.frontend.artiq_ctlmgr:main", - "artiq_gui=artiq.frontend.artiq_gui:main", - "artiq_master=artiq.frontend.artiq_master:main", - "artiq_run=artiq.frontend.artiq_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", - ], + "console_scripts": scripts, } )