From 5a134c82c5687a6bec412d0d498966f22dbabca0 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 5 Jun 2017 21:34:28 +0800 Subject: [PATCH] conda: use new noarch system --- conda/artiq-dev/meta.yaml | 2 +- conda/artiq/build.sh | 5 ----- conda/artiq/meta.yaml | 12 ++++++++++- setup.py | 44 +++++++++++++++++++-------------------- 4 files changed, 34 insertions(+), 29 deletions(-) delete mode 100755 conda/artiq/build.sh diff --git a/conda/artiq-dev/meta.yaml b/conda/artiq-dev/meta.yaml index 2185b0db7..cfc764504 100644 --- a/conda/artiq-dev/meta.yaml +++ b/conda/artiq-dev/meta.yaml @@ -6,7 +6,7 @@ source: git_url: ../.. build: - noarch_python: true + noarch: python number: {{ environ.get("GIT_DESCRIBE_NUMBER", 0) }} string: py_{{ environ.get("GIT_DESCRIBE_NUMBER", 0) }}+git{{ environ.get("GIT_FULL_HASH", "")[:8] }} diff --git a/conda/artiq/build.sh b/conda/artiq/build.sh deleted file mode 100755 index b2b5e3dd0..000000000 --- a/conda/artiq/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -ARTIQ_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq - -$PYTHON setup.py install --single-version-externally-managed --record=record.txt diff --git a/conda/artiq/meta.yaml b/conda/artiq/meta.yaml index 25ba8d681..ebe3b5909 100644 --- a/conda/artiq/meta.yaml +++ b/conda/artiq/meta.yaml @@ -5,10 +5,20 @@ package: source: git_url: ../.. +{% set data = load_setup_py_data() %} + build: - noarch_python: true + noarch: python number: {{ environ.get("GIT_DESCRIBE_NUMBER", 0) }} string: py_{{ environ.get("GIT_DESCRIBE_NUMBER", 0) }}+git{{ environ.get("GIT_FULL_HASH", "")[:8] }} + entry_points: + # NOTE: conda-build cannot distinguish between console and gui scripts + {% for entry_point_type, entry_points in data.get("entry_points", dict()).items() -%} + {% for entry_point in entry_points -%} + - {{ entry_point }} + {% endfor %} + {% endfor %} + script: $PYTHON setup.py install --single-version-externally-managed --record=record.txt requirements: build: diff --git a/setup.py b/setup.py index a9ad48dcc..37cbcda83 100755 --- a/setup.py +++ b/setup.py @@ -20,32 +20,32 @@ requirements = [ ] console_scripts = [ - "artiq_client=artiq.frontend.artiq_client:main", - "artiq_compile=artiq.frontend.artiq_compile:main", - "artiq_coreanalyzer=artiq.frontend.artiq_coreanalyzer:main", - "artiq_coreconfig=artiq.frontend.artiq_coreconfig:main", - "artiq_corelog=artiq.frontend.artiq_corelog:main", - "artiq_coreboot=artiq.frontend.artiq_coreboot:main", - "artiq_ctlmgr=artiq.frontend.artiq_ctlmgr:main", - "artiq_devtool=artiq.frontend.artiq_devtool:main", - "artiq_influxdb=artiq.frontend.artiq_influxdb:main", - "artiq_master=artiq.frontend.artiq_master:main", - "artiq_mkfs=artiq.frontend.artiq_mkfs:main", - "artiq_session=artiq.frontend.artiq_session:main", - "artiq_rpctool=artiq.frontend.artiq_rpctool:main", - "artiq_run=artiq.frontend.artiq_run:main", - "artiq_flash=artiq.frontend.artiq_flash:main", + "artiq_client = artiq.frontend.artiq_client:main", + "artiq_compile = artiq.frontend.artiq_compile:main", + "artiq_coreanalyzer = artiq.frontend.artiq_coreanalyzer:main", + "artiq_coreconfig = artiq.frontend.artiq_coreconfig:main", + "artiq_corelog = artiq.frontend.artiq_corelog:main", + "artiq_coreboot = artiq.frontend.artiq_coreboot:main", + "artiq_ctlmgr = artiq.frontend.artiq_ctlmgr:main", + "artiq_devtool = artiq.frontend.artiq_devtool:main", + "artiq_influxdb = artiq.frontend.artiq_influxdb:main", + "artiq_master = artiq.frontend.artiq_master:main", + "artiq_mkfs = artiq.frontend.artiq_mkfs:main", + "artiq_session = artiq.frontend.artiq_session:main", + "artiq_rpctool = artiq.frontend.artiq_rpctool:main", + "artiq_run = artiq.frontend.artiq_run:main", + "artiq_flash = artiq.frontend.artiq_flash:main", - "aqctl_lda=artiq.frontend.aqctl_lda:main", - "aqctl_novatech409b=artiq.frontend.aqctl_novatech409b:main", - "aqctl_korad_ka3005p=artiq.frontend.aqctl_korad_ka3005p:main", - "aqctl_pdq=artiq.frontend.aqctl_pdq:main", - "aqctl_thorlabs_tcube=artiq.frontend.aqctl_thorlabs_tcube:main", + "aqctl_lda = artiq.frontend.aqctl_lda:main", + "aqctl_novatech409b = artiq.frontend.aqctl_novatech409b:main", + "aqctl_korad_ka3005p = artiq.frontend.aqctl_korad_ka3005p:main", + "aqctl_pdq = artiq.frontend.aqctl_pdq:main", + "aqctl_thorlabs_tcube = artiq.frontend.aqctl_thorlabs_tcube:main", ] gui_scripts = [ - "artiq_browser=artiq.frontend.artiq_browser:main", - "artiq_dashboard=artiq.frontend.artiq_dashboard:main", + "artiq_browser = artiq.frontend.artiq_browser:main", + "artiq_dashboard = artiq.frontend.artiq_dashboard:main", ] setup(