From 0b5e1d174cb4ce93ec6d0ce3b37a3ad196159344 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 7 Nov 2015 13:26:14 +0300 Subject: [PATCH 1/2] Unbreak artiq_flash.sh. --- artiq/frontend/artiq_flash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/frontend/artiq_flash.sh b/artiq/frontend/artiq_flash.sh index 4443c54b6..f74f8910f 100755 --- a/artiq/frontend/artiq_flash.sh +++ b/artiq/frontend/artiq_flash.sh @@ -13,7 +13,7 @@ def run(script): run(""" set -e -ARTIQ_PREFIX=$(python3 -c "import artiq; print(artiq.__path__[0])") +ARTIQ_PREFIX=$(python3.5 -c "import artiq; print(artiq.__path__[0])") # Default is kc705 BOARD=kc705 From 51f04f63116cc29daae8561ffafe871359154eca Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 7 Nov 2015 13:39:39 +0300 Subject: [PATCH 2/2] Explicitly use the python3.5 binary everywhere. --- artiq/frontend/artiq_client.py | 2 +- artiq/frontend/artiq_compile.py | 2 +- artiq/frontend/artiq_coretool.py | 2 +- artiq/frontend/artiq_ctlmgr.py | 2 +- artiq/frontend/artiq_flash.sh | 2 +- artiq/frontend/artiq_gui.py | 2 +- artiq/frontend/artiq_influxdb.py | 2 +- artiq/frontend/artiq_master.py | 2 +- artiq/frontend/artiq_mkfs.py | 2 +- artiq/frontend/artiq_rpctool.py | 2 +- artiq/frontend/artiq_run.py | 2 +- artiq/frontend/lda_controller.py | 2 +- artiq/frontend/novatech409b_controller.py | 2 +- artiq/frontend/pdq2_controller.py | 2 +- artiq/frontend/pxi6733_controller.py | 2 +- artiq/frontend/thorlabs_tcube_controller.py | 2 +- artiq/gateware/targets/kc705.py | 2 +- artiq/gateware/targets/pipistrello.py | 2 +- artiq/runtime/Makefile | 2 +- artiq/runtime/gen_service_table.py | 2 +- doc/manual/installing.rst | 28 ++++++++++----------- 21 files changed, 33 insertions(+), 35 deletions(-) diff --git a/artiq/frontend/artiq_client.py b/artiq/frontend/artiq_client.py index bcf6e2851..2324bcdee 100755 --- a/artiq/frontend/artiq_client.py +++ b/artiq/frontend/artiq_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse import logging diff --git a/artiq/frontend/artiq_compile.py b/artiq/frontend/artiq_compile.py index e55b7ee1b..78ebff837 100755 --- a/artiq/frontend/artiq_compile.py +++ b/artiq/frontend/artiq_compile.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import logging import argparse diff --git a/artiq/frontend/artiq_coretool.py b/artiq/frontend/artiq_coretool.py index 0574c53c1..53ee9a13b 100755 --- a/artiq/frontend/artiq_coretool.py +++ b/artiq/frontend/artiq_coretool.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse diff --git a/artiq/frontend/artiq_ctlmgr.py b/artiq/frontend/artiq_ctlmgr.py index ad9071eda..b8cf0a16e 100755 --- a/artiq/frontend/artiq_ctlmgr.py +++ b/artiq/frontend/artiq_ctlmgr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import asyncio import atexit diff --git a/artiq/frontend/artiq_flash.sh b/artiq/frontend/artiq_flash.sh index f74f8910f..cc4fb734a 100755 --- a/artiq/frontend/artiq_flash.sh +++ b/artiq/frontend/artiq_flash.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3.5 # conda-build requires all scripts to have a python shebang. # see https://github.com/conda/conda-build/blob/6921f067a/conda_build/noarch_python.py#L36-L38 diff --git a/artiq/frontend/artiq_gui.py b/artiq/frontend/artiq_gui.py index d3f5f7d11..e0af8b320 100755 --- a/artiq/frontend/artiq_gui.py +++ b/artiq/frontend/artiq_gui.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse import asyncio diff --git a/artiq/frontend/artiq_influxdb.py b/artiq/frontend/artiq_influxdb.py index 36e7be2c3..558435ef3 100755 --- a/artiq/frontend/artiq_influxdb.py +++ b/artiq/frontend/artiq_influxdb.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse import logging diff --git a/artiq/frontend/artiq_master.py b/artiq/frontend/artiq_master.py index 4659cf1a0..3b1c89dbe 100755 --- a/artiq/frontend/artiq_master.py +++ b/artiq/frontend/artiq_master.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import asyncio import argparse diff --git a/artiq/frontend/artiq_mkfs.py b/artiq/frontend/artiq_mkfs.py index 22c21f1d0..0a78afa1b 100755 --- a/artiq/frontend/artiq_mkfs.py +++ b/artiq/frontend/artiq_mkfs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse import struct diff --git a/artiq/frontend/artiq_rpctool.py b/artiq/frontend/artiq_rpctool.py index e097fb6e8..3328ccd6f 100755 --- a/artiq/frontend/artiq_rpctool.py +++ b/artiq/frontend/artiq_rpctool.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse import textwrap diff --git a/artiq/frontend/artiq_run.py b/artiq/frontend/artiq_run.py index 0db16a4d6..fa65a6a0a 100755 --- a/artiq/frontend/artiq_run.py +++ b/artiq/frontend/artiq_run.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 # Copyright (C) 2014, 2015 M-Labs Limited # Copyright (C) 2014, 2015 Robert Jordens diff --git a/artiq/frontend/lda_controller.py b/artiq/frontend/lda_controller.py index 8286bc143..78b0b28f2 100755 --- a/artiq/frontend/lda_controller.py +++ b/artiq/frontend/lda_controller.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse diff --git a/artiq/frontend/novatech409b_controller.py b/artiq/frontend/novatech409b_controller.py index 57846ae95..1f74a8a1e 100755 --- a/artiq/frontend/novatech409b_controller.py +++ b/artiq/frontend/novatech409b_controller.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 # Written by Joe Britton, 2015 diff --git a/artiq/frontend/pdq2_controller.py b/artiq/frontend/pdq2_controller.py index f84a6a404..c8fdd0684 100755 --- a/artiq/frontend/pdq2_controller.py +++ b/artiq/frontend/pdq2_controller.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse import sys diff --git a/artiq/frontend/pxi6733_controller.py b/artiq/frontend/pxi6733_controller.py index 9658dc6bb..54dca78b1 100755 --- a/artiq/frontend/pxi6733_controller.py +++ b/artiq/frontend/pxi6733_controller.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 # Yann Sionneau , 2015 import argparse diff --git a/artiq/frontend/thorlabs_tcube_controller.py b/artiq/frontend/thorlabs_tcube_controller.py index 6e8d9bbc8..59abe1ff9 100755 --- a/artiq/frontend/thorlabs_tcube_controller.py +++ b/artiq/frontend/thorlabs_tcube_controller.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse import sys diff --git a/artiq/gateware/targets/kc705.py b/artiq/gateware/targets/kc705.py index 38228e136..54df3bb8a 100755 --- a/artiq/gateware/targets/kc705.py +++ b/artiq/gateware/targets/kc705.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import argparse import os diff --git a/artiq/gateware/targets/pipistrello.py b/artiq/gateware/targets/pipistrello.py index 0561f850b..e0696ef9d 100755 --- a/artiq/gateware/targets/pipistrello.py +++ b/artiq/gateware/targets/pipistrello.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 # Copyright (C) 2014, 2015 Robert Jordens # Copyright (C) 2014, 2015 M-Labs Limited diff --git a/artiq/runtime/Makefile b/artiq/runtime/Makefile index 476d4ab3f..b572d5f12 100644 --- a/artiq/runtime/Makefile +++ b/artiq/runtime/Makefile @@ -1,7 +1,7 @@ include ../include/generated/variables.mak include $(MISOC_DIRECTORY)/software/common.mak -PYTHON ?= python3 +PYTHON ?= python3.5 OBJECTS := isr.o flash_storage.o clock.o rtiocrg.o elf_loader.o services.o session.o log.o test_mode.o kloader.o bridge_ctl.o mailbox.o ksupport_data.o net_server.o moninj.o main.o OBJECTS_KSUPPORT := ksupport.o exception_jmp.o exceptions.o mailbox.o bridge.o rtio.o ttl.o dds.o diff --git a/artiq/runtime/gen_service_table.py b/artiq/runtime/gen_service_table.py index 27ae562b0..8038d87b6 100755 --- a/artiq/runtime/gen_service_table.py +++ b/artiq/runtime/gen_service_table.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3.5 import sys diff --git a/doc/manual/installing.rst b/doc/manual/installing.rst index 788dc7870..be6a28cfb 100644 --- a/doc/manual/installing.rst +++ b/doc/manual/installing.rst @@ -174,7 +174,7 @@ These steps are required to generate bitstream (``.bit``) files, build the MiSoC $ cd ~/artiq-dev $ git clone https://github.com/m-labs/migen $ cd migen - $ python3 setup.py develop --user + $ python3.5 setup.py develop --user .. note:: The options ``develop`` and ``--user`` are for setup.py to install Migen in ``~/.local/lib/python3.5``. @@ -225,14 +225,14 @@ These steps are required to generate bitstream (``.bit``) files, build the MiSoC $ cd ~/artiq-dev $ git clone --recursive https://github.com/m-labs/misoc $ cd misoc - $ python3 setup.py develop --user + $ python3.5 setup.py develop --user * Download and install ARTIQ: :: $ cd ~/artiq-dev $ git clone --recursive https://github.com/m-labs/artiq $ cd artiq - $ python3 setup.py develop --user + $ python3.5 setup.py develop --user .. note:: If you have any trouble during ARTIQ setup about ``pygit2`` installation, @@ -250,11 +250,11 @@ These steps are required to generate bitstream (``.bit``) files, build the MiSoC * For Pipistrello:: - $ python3 -m artiq.gateware.targets.pipistrello + $ python3.5 -m artiq.gateware.targets.pipistrello * For KC705:: - $ python3 -m artiq.gateware.targets.kc705 -H qc1 # or qc2 + $ python3.5 -m artiq.gateware.targets.kc705 -H qc1 # or qc2 * Then, gather the binaries and flash them: :: @@ -291,14 +291,14 @@ Installing the host-side software $ git clone https://github.com/m-labs/llvmlite $ git checkout artiq $ cd llvmlite - $ LLVM_CONFIG=/usr/local/llvm-or1k/bin/llvm-config python3 setup.py install --user + $ LLVM_CONFIG=/usr/local/llvm-or1k/bin/llvm-config python3.5 setup.py install --user * Install ARTIQ: :: $ cd ~/artiq-dev $ git clone --recursive https://github.com/m-labs/artiq # if not already done $ cd artiq - $ python3 setup.py develop --user + $ python3.5 setup.py develop --user .. note:: If you have any trouble during ARTIQ setup about ``pygit2`` installation, @@ -306,15 +306,15 @@ Installing the host-side software On Ubuntu 14.04:: - $ pip install --user pygit2==0.19.1 + $ python3.5 `which pip3` install --user pygit2==0.19.1 On Ubuntu 14.10:: - $ pip install --user pygit2==0.20.3 + $ python3.5 `which pip3` install --user pygit2==0.20.3 On Ubuntu 15.04 and 15.10:: - $ pip install --user pygit2==0.22.1 + $ python3.5 `which pip3` install --user pygit2==0.22.1 The rationale behind this is that pygit2 and libgit2 must have the same major.minor version numbers. @@ -408,14 +408,12 @@ The core device may use either an external clock signal or its internal clock. T $ artiq_coretool cfg-write -s startup_clock i # internal clock (default) $ artiq_coretool cfg-write -s startup_clock e # external clock -Ubuntu 14.04 specific instructions ----------------------------------- +Ubuntu 15.10+/Debian jessie+ specific instructions +-------------------------------------------------- This command installs all the required packages: :: - $ sudo apt-get install build-essential autotools-dev file git patch perl xutils-dev python3-pip texinfo flex bison libmpc-dev python3-serial python3-dateutil python3-prettytable python3-setuptools python3-numpy python3-scipy python3-sphinx python3-h5py python3-dev python-dev subversion cmake libusb-dev libftdi-dev pkg-config libffi-dev libgit2-dev - -Note that ARTIQ requires Python 3.5.0 or above. + $ sudo apt-get install build-essential autotools-dev file git patch perl xutils-dev texinfo flex bison libmpc-dev subversion cmake libusb-dev libftdi-dev pkg-config libffi-dev libgit2-dev python3.5 python3.5-dev To set user permissions on the JTAG and serial ports of the Pipistrello, create a ``/etc/udev/rules.d/30-usb-papilio.rules`` file containing the following: ::