mirror of https://github.com/m-labs/artiq.git
conda: include udev rules and artiq_flash.sh in artiq package.
This commit is contained in:
parent
026504e578
commit
30842a7174
|
@ -1,5 +1,16 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env python
|
||||||
|
# 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
|
||||||
|
|
||||||
|
def run(script):
|
||||||
|
import sys, tempfile, subprocess
|
||||||
|
file = tempfile.NamedTemporaryFile(mode='w+t', suffix='sh')
|
||||||
|
file.write(script)
|
||||||
|
file.flush()
|
||||||
|
subprocess.run(["/bin/bash", file.name] + sys.argv[1:])
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
run("""
|
||||||
# exit on error
|
# exit on error
|
||||||
set -e
|
set -e
|
||||||
# print commands
|
# print commands
|
||||||
|
@ -72,7 +83,7 @@ do
|
||||||
echo ""
|
echo ""
|
||||||
echo "To flash everything, do not use any of the -b|-B|-r option."
|
echo "To flash everything, do not use any of the -b|-B|-r option."
|
||||||
echo ""
|
echo ""
|
||||||
echo "usage: $0 [-b] [-B] [-r] [-h] [-m nist_qc1|nist_qc2] [-t kc705|pipistrello] [-d path] [-f path]"
|
echo "usage: artiq_flash.sh [-b] [-B] [-r] [-h] [-m nist_qc1|nist_qc2] [-t kc705|pipistrello] [-d path] [-f path]"
|
||||||
echo "-b Flash bitstream"
|
echo "-b Flash bitstream"
|
||||||
echo "-B Flash BIOS"
|
echo "-B Flash BIOS"
|
||||||
echo "-r Flash ARTIQ runtime"
|
echo "-r Flash ARTIQ runtime"
|
||||||
|
@ -193,3 +204,4 @@ then
|
||||||
fi
|
fi
|
||||||
echo "Done."
|
echo "Done."
|
||||||
xc3sprog -v -c $CABLE -R > /dev/null 2>&1
|
xc3sprog -v -c $CABLE -R > /dev/null 2>&1
|
||||||
|
""")
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
ARTIQ_PREFIX=$PREFIX/lib/python3.5/site-packages/artiq
|
||||||
|
|
||||||
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
|
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
|
||||||
|
|
||||||
|
# install scripts
|
||||||
|
|
||||||
|
cp artiq/frontend/artiq_flash.sh $PREFIX/bin
|
||||||
|
|
||||||
|
# install udev rules
|
||||||
|
|
||||||
|
mkdir -p $ARTIQ_PREFIX/misc
|
||||||
|
cp misc/99-papilio.rules $ARTIQ_PREFIX/misc/
|
||||||
|
cp misc/99-kc705.rules $ARTIQ_PREFIX/misc/
|
||||||
|
|
Loading…
Reference in New Issue