forked from M-Labs/artiq
1
0
Fork 0

python3.5 -> python3

Many things also work with Python 3.6.
This commit is contained in:
Sebastien Bourdeauducq 2017-01-30 09:24:43 +08:00
parent 657afd770e
commit 43aad0914e
39 changed files with 53 additions and 53 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
from PyQt5 import QtWidgets

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import PyQt5 # make sure pyqtgraph imports Qt5
import pyqtgraph

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import PyQt5 # make sure pyqtgraph imports Qt5
import pyqtgraph

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import numpy as np
import PyQt5 # make sure pyqtgraph imports Qt5

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import numpy as np
from PyQt5 import QtWidgets

View File

@ -209,7 +209,7 @@
"host": "::1",
"port": 6283,
"target_name": "camera_sim",
"command": "python3.5 -m artiq.examples.remote_exec_controller"
"command": "python3 -m artiq.examples.remote_exec_controller"
},
"camera_sim_rexec": {
"type": "controller_aux_target",

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import numpy as np
from numba import jit

View File

@ -1,7 +1,7 @@
include ../include/generated/variables.mak
include $(MISOC_DIRECTORY)/software/common.mak
PYTHON ?= python3.5
PYTHON ?= python3
RUSTOUT := cargo/or1k-unknown-none/debug

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import asyncio

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import logging

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import os, sys, logging, argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import struct

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import asyncio
import atexit

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import asyncio

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
# This script makes the following assumptions:
# * miniconda is installed remotely at ~/miniconda

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
# Copyright (C) 2015 Robert Jordens <jordens@gmail.com>
import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import logging

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import asyncio
import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import struct

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import textwrap

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
# Copyright (C) 2014, 2015 M-Labs Limited
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
# Copyright 2014-2017 Robert Jordens <jordens@gmail.com>
# after
# https://github.com/mfischer/fpgadev-zynq/blob/master/top/python/bit_to_zynq_bin.py

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
# Written by Joe Britton, 2016

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
# Written by Joe Britton, 2015

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse
import sys

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
import argparse

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com>
# Copyright (C) 2014, 2015 M-Labs Limited

View File

@ -1,7 +1,7 @@
include ../include/generated/variables.mak
include $(MISOC_DIRECTORY)/software/common.mak
PYTHON ?= python3.5
PYTHON ?= python3
CARGO_normal := env
CARGO_quiet = @echo " CARGO " $@ && $(CARGO_normal)

View File

@ -11,7 +11,7 @@ find ARTIQ examples?
The examples are installed in the ``examples`` folder of the ARTIQ package. You can find where the ARTIQ package is installed on your machine with: ::
python3.5 -c "import artiq; print(artiq.__path__[0])"
python3 -c "import artiq; print(artiq.__path__[0])"
Copy the ``examples`` folder from that path into your home/user directory, and start experimenting!
@ -75,7 +75,7 @@ determine the pyserial URL to attach to a device by its serial number?
You can list your system's serial devices and print their vendor/product
id and serial number by running::
$ python3.5 -m serial.tools.list_ports -v
$ python3 -m serial.tools.list_ports -v
It will give you the ``/dev/ttyUSBxx`` (or the ``COMxx`` for Windows) device
names.
@ -93,7 +93,7 @@ See the :ref:`TDC001 documentation <tdc001-controller-usage-example>` for an exa
run unit tests?
---------------
The unit tests assume that the Python environment has been set up in such a way that ``import artiq`` will import the code being tested, and that this is still true for any subprocess created. This is not the way setuptools operates as it adds the path to ARTIQ to ``sys.path`` which is not passed to subprocesses; as a result, running the tests via ``setup.py`` is not supported. The user must first install the package or set ``PYTHONPATH``, and then run the tests with e.g. ``python3.5 -m unittest discover`` in the ``artiq/test`` folder and ``lit .`` in the ``artiq/test/lit`` folder.
The unit tests assume that the Python environment has been set up in such a way that ``import artiq`` will import the code being tested, and that this is still true for any subprocess created. This is not the way setuptools operates as it adds the path to ARTIQ to ``sys.path`` which is not passed to subprocesses; as a result, running the tests via ``setup.py`` is not supported. The user must first install the package or set ``PYTHONPATH``, and then run the tests with e.g. ``python3 -m unittest discover`` in the ``artiq/test`` folder and ``lit .`` in the ``artiq/test/lit`` folder.
For the hardware-in-the-loop unit tests, set the ``ARTIQ_ROOT`` environment variable to the path to a device database containing the relevant devices.

View File

@ -28,7 +28,7 @@ Copy the file ``device_db.pyon`` (containing the device database) from the ``exa
.. note::
To obtain the examples, you can find where the ARTIQ package is installed on your machine with: ::
python3.5 -c "import artiq; print(artiq.__path__[0])"
python3 -c "import artiq; print(artiq.__path__[0])"
Run your code using ``artiq_run``, which is part of the ARTIQ front-end tools: ::

View File

@ -155,7 +155,7 @@ Commit, push and submit the experiment as before. Go to the "Datasets" dock of t
Plotting in the ARTIQ dashboard is achieved by programs called "applets". Applets are independent programs that add simple GUI features and are run as separate processes (to achieve goals of modularity and resilience against poorly written applets). Users may write their own applets, or use those supplied with ARTIQ (in the ``artiq.applets`` module) that cover basic plotting.
Applets are configured through their command line to select parameters such as the names of the datasets to plot. The list of command-line options can be retrieved using the ``-h`` option; for example you can run ``python3.5 -m artiq.applets.plot_xy -h`` in a terminal.
Applets are configured through their command line to select parameters such as the names of the datasets to plot. The list of command-line options can be retrieved using the ``-h`` option; for example you can run ``python3 -m artiq.applets.plot_xy -h`` in a terminal.
In our case, create a new applet from the XY template by right-clicking on the applet list, and edit the applet command line so that it retrieves the ``parabola`` dataset. Run the experiment again, and observe how the points are added one by one to the plot.

View File

@ -101,7 +101,7 @@ These steps are required to generate gateware bitstream (``.bit``) files, build
$ cd ~/artiq-dev
$ git clone https://github.com/m-labs/migen
$ cd migen
$ python3.5 setup.py develop --user
$ python3 setup.py develop --user
.. note::
The options ``develop`` and ``--user`` are for setup.py to install Migen in ``~/.local/lib/python3.5``.
@ -127,28 +127,28 @@ These steps are required to generate gateware bitstream (``.bit``) files, build
$ cd ~/artiq-dev
$ git clone https://www.github.com/m-labs/asyncserial
$ cd asyncserial
$ python3.5 setup.py develop --user
$ python3 setup.py develop --user
* Download and install MiSoC: ::
$ cd ~/artiq-dev
$ git clone --recursive https://github.com/m-labs/misoc
$ cd misoc
$ python3.5 setup.py develop --user
$ python3 setup.py develop --user
* Download and install ``pythonparser``: ::
$ cd ~/artiq-dev
$ git clone https://www.github.com/m-labs/pythonparser
$ cd pythonparser
$ python3.5 setup.py develop --user
$ python3 setup.py develop --user
* Download and install ARTIQ: ::
$ cd ~/artiq-dev
$ git clone --recursive https://github.com/m-labs/artiq
$ cd artiq
$ python3.5 setup.py develop --user
$ python3 setup.py develop --user
.. note::
If you have any trouble during ARTIQ setup about ``pygit2`` installation,
@ -166,11 +166,11 @@ These steps are required to generate gateware bitstream (``.bit``) files, build
* For Pipistrello::
$ python3.5 -m artiq.gateware.targets.pipistrello
$ python3 -m artiq.gateware.targets.pipistrello
* For KC705::
$ python3.5 -m artiq.gateware.targets.kc705_dds -H nist_clock # or nist_qc2
$ python3 -m artiq.gateware.targets.kc705_dds -H nist_clock # or nist_qc2
.. note:: Add ``--toolchain ise`` if you wish to use ISE instead of Vivado.
@ -211,14 +211,14 @@ Installing the host-side software
$ git clone https://github.com/m-labs/llvmlite
$ cd llvmlite
$ git checkout artiq-3.9
$ LLVM_CONFIG=/usr/local/llvm-or1k/bin/llvm-config python3.5 setup.py install --user
$ LLVM_CONFIG=/usr/local/llvm-or1k/bin/llvm-config python3 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.5 setup.py develop --user
$ python3 setup.py develop --user
.. note::
If you have any trouble during ARTIQ setup about ``pygit2`` installation,
@ -226,19 +226,19 @@ Installing the host-side software
On Ubuntu 14.04::
$ python3.5 `which pip3` install --user pygit2==0.19.1
$ python3 `which pip3` install --user pygit2==0.19.1
On Ubuntu 14.10::
$ python3.5 `which pip3` install --user pygit2==0.20.3
$ python3 `which pip3` install --user pygit2==0.20.3
On Ubuntu 15.04 and 15.10::
$ python3.5 `which pip3` install --user pygit2==0.22.1
$ python3 `which pip3` install --user pygit2==0.22.1
On Ubuntu 16.04::
$ python3.5 `which pip3` install --user pygit2==0.24.1
$ python3 `which pip3` install --user pygit2==0.24.1
The rationale behind this is that pygit2 and libgit2 must have the same
major.minor version numbers.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3.5
#!/usr/bin/env python3
from setuptools import setup, find_packages
import sys