Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #48 from tango-controls/add-sardana
Browse files Browse the repository at this point in the history
Sardana added
  • Loading branch information
piogor authored Apr 16, 2019
2 parents 4524e97 + 06eb563 commit 31bab68
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 3 deletions.
46 changes: 46 additions & 0 deletions scripts/060-install-python-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

set -x
set -e

BUILD_DIR=~/work/tangobox/build
PIP_INSTALL_FLAGS='--user'

sudo apt install -y \
python-pip \
python-qt4 \
qt4-designer \
python-qwt \
python-qwt5-qt4 \
python-guiqwt \
python-numpy \
pymca \
python-pymca5 \
libboost-python-dev \
python-pyqt5.qtwebkit \
python-pyqt5.qtsvg \
python-spyder \
python-spyderlib \
python-html5lib \
python-ipython \
python-ply

pip install ${PIP_INSTALL_FLAGS} numpy
pip install ${PIP_INSTALL_FLAGS} sphinx
pip install ${PIP_INSTALL_FLAGS} sphinx_rtd_theme
pip install ${PIP_INSTALL_FLAGS} lxml

cd "$BUILD_DIR"
git clone --branch v9.3.0 https://github.com/tango-controls/pytango.git
cd pytango/
git cherry-pick bfdc6bbbd5077b2a5b0a4ee8c846d746117b192a # is_empty patch
git cherry-pick c09c337a0d594825952f797c8fa9de5d09fe890c # six 1.12 requirement
python setup.py bdist_wheel

pip install ${PIP_INSTALL_FLAGS} $BUILD_DIR/pytango/dist/pytango-*.whl
pip install ${PIP_INSTALL_FLAGS} itango
pip install ${PIP_INSTALL_FLAGS} taurus
pip install ${PIP_INSTALL_FLAGS} sardana
pip install ${PIP_INSTALL_FLAGS} git+https://github.com/S2Innovation/lib-maxiv-dsconfig.git@dump-class-properties

pip install ${PIP_INSTALL_FLAGS} --force-reinstall $BUILD_DIR/pytango/dist/pytango-*.whl
33 changes: 33 additions & 0 deletions scripts/210-configure-sardana.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

# Please stop and delete any sardana1 server before running this script.

set -x
set -e

rm -rf /tmp/tango/Sardana/
rm -rf ~/.ipython/profile_spockdoor/

Sardana sardana1 << EOF &
y
...
EOF

SARDANA_PID=$!

# Give the server some time to start (10s is not enough). Solves below issue:
# An error occurred while running Macro 'sar_demo() -> 84894c5c-5d1f-11e9-858f-080027609c00':
# Either of: Controller with name motctrl01 does not exist or Controller with name motctrl01 does not exist made it impossible to decode parameters
sleep 20

spock << EOF
y
Door_sardana1_1
sar_demo
lsm
ascan gap01 0.9 1.1 4 1
exit
...
EOF

kill $SARDANA_PID
5 changes: 2 additions & 3 deletions scripts/install-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
# This script installs examples

# install a SardanaGUI
# cd ~/examples/SardanaGUI
# pip install . --user
pip install --user ~/examples/SardanaGUI/

# make jlinac example running
cd ~/bin/
ln -s ~/examples/linac/JLinac/jlinac

cd ~/Desktop/
ln -s ~/examples/ "Examples"
ln -s ~/examples/ "Examples"

0 comments on commit 31bab68

Please sign in to comment.