#!/usr/bin/bash #copy and paste this into a shell to watch the magic happen #notes on optional dependencies # #not necessary but used in some of the unit tests: python-numpy #for experimental material/package dependency unit tests (tests/test_dep.py): python-pyparsing #for generating graphs (like from paths.py): graphviz, igraph sudo apt-get install git-core python-yaml units python-numpy python-pyparsing graphviz python-setuptools mkdir ~/code cd ~/code/ git clone http://adl.serveftp.org/skdb.git #so python knows where to find skdb in order to import it echo "export PYTHONPATH=\$PYTHONPATH:~/code/" >> ~/.bashrc source ~/.bashrc #edit the path to packages if necessary, i.e. to: /home/username/code/skdb/packages/ #note to kanzure: isnt /usr/local/share/skdb/packages fine as-is? #nano ~/code/skdb/config.yaml #***DONE*** #if you're just interested in poking around a little bit, this is probably all you need, and can stop here. #everything else will probably just piss you off. #now run some unit tests in the tests/ directory to see what works! mkdir ~/local #this is just a folder i put downloaded code into ################################ #igraph (10.3 MB) echo "deb http://cneurocvs.rmki.kfki.hu /packages/binary/" | sudo tee -a /etc/apt/sources.list echo "deb-src http://cneurocvs.rmki.kfki.hu /packages/source/" | sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get install libigraph libigraph-dev python-igraph ################################ #bugseverywhere sudo apt-get install bzr docbook-to-man #for some stupid reason bugseverywhere is not backwards compatible and we can't just use the .deb version bzr get -r330 http://bzr.bugseverywhere.org/be cd be/ make sudo python setup.py install ################################ #for web/web.py #cherrypy 3.1.2 #cd ~/local/; mkdir cherrpy; cd cherrpy; #wget http://download.cherrypy.org/cherrypy/3.1.2/CherryPy-3.1.2.tar.gz #tar -zxvf CherryPy-3.1.2.tar.gz #cd CherryPy-3.1.2/ #sudo python setup.py install sudo apt-get install python-cherrypy3=3.1.2-1 #Cheetah-2.2.2-py2.5-linux-i686.egg #debian has 2.0.1-2 (python-cheetah=2.0.1-2) sudo easy_install Cheetah #dulwich 0.4.0 (ubuntu users have 0.4.0 on 'lucid') #url: http://packages.ubuntu.com/lucid/python-dulwich cd ~/local/; mkdir dulwich; cd dulwich; wget http://samba.org/~jelmer/dulwich/dulwich-0.4.0.tar.gz tar -zxf dulwich-0.4.0.tar.gz cd dulwich-0.4.0/ sudo python setup.py install ################################ #for inventory/ web stuff (not necessary) sudo apt-get install python-django ################################ #pythonOCC and opencascade #see also: http://adl.serveftp.org/dokuwiki/pythonocc sudo apt-get install libopencascade-visualization-dev libopencascade-dev scons python-psyco swig checkinstall x11proto-core-dev libx11-dev libopencascade-ocaf-dev opencascade-wok opencascade-draw python-setuptools build-essential libstdc++6-4.3-dev python-dev python-wxgtk2.8 #swig wrappers come pre-generated so you don't need gccxml if just compiling, however #to get pygccxml if you use -generate_swig on setup.py for pythonocc later, do: #sudo apt-get install gccxml #cd ~/local/; mkdir pygccxml; cd pygccxml/; #wget http://downloads.sourceforge.net/project/pygccxml/pygccxml/pygccxml-1.0/pygccxml-1.0.0.zip #unzip pygccxml-1.0.0.zip #cd pygccxml-1.0.0/ #sudo python setup.py install cd ~/local/; mkdir pythonocc/; cd pythonocc/; wget http://download.gna.org/pythonocc/source_release/pythonOCC-0.3.tar.gz tar -zxvf pythonOCC-0.3.tar.gz cd pythonOCC-0.3/ #if you're on debian or ubuntu cd src/ sed -i 's|/usr/local/inc|/usr/include/opencascade|' wrapper/environment.py sed -i 's|/usr/local/lib|/usr/lib|' wrapper/environment.py sed -i "s/'mscmd',//" setup.py #in wrapper/environment.py #search for "linux2" #add these to swig_opts: # -classic -nomodern -nomodernargs #.. or use these sed lines: sed -i -e '144s/modern/nomodern/' wrapper/environment.py sed -i -e '144s/ = \[/ = \[ -\'classic\' , -\'nomodernargs\', /' wrapper/environment.py sudo ln -s /usr/lib/libTKCDLFront-6.3.0.so /usr/lib/libTKCDLFront.so sudo ln -s /usr/lib/libTKCPPClient-6.3.0.so /usr/lib/libTKCPPClient.so sudo ln -s /usr/lib/libTKCPPExt-6.3.0.so /usr/lib/libTKCPPExt.so sudo ln -s /usr/lib/libTKCPPIntExt-6.3.0.so /usr/lib/libTKCPPIntExt.so sudo ln -s /usr/lib/libTKCPPJini-6.3.0.so /usr/lib/libTKCPPJini.so sudo ln -s /usr/lib/libTKCSFDBSchema-6.3.0.so /usr/lib/libTKCSFDBSchema.so sudo ln -s /usr/lib/libTKIDLFront-6.3.0.so /usr/lib/libTKIDLFront.so sudo ln -s /usr/lib/libTKTCPPExt-6.3.0.so /usr/lib/libTKTCPPExt.so sudo ln -s /usr/lib/libTKWOK-6.3.0.so /usr/lib/libTKWOK.so sudo ln -s /usr/lib/libTKWOKTcl-6.3.0.so /usr/lib/libTKWOKTcl.so sudo ln -s /usr/lib/libmscmd-6.2.so /usr/lib/libmscmd.so sudo python setup.py build -NO_GEOM time sudo python setup.py install -NO_GEOM export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.6/dist-packages/OCC sudo cp -p /usr/lib/opencas/lib* /usr/lib/ echo "export CSF_GraphicShr=/usr/lib/libTKOpenGl.so" >> ~/.bashrc source ~/.bashrc