blob: 972b058aa5096efb81a3537c90735e2e7d22e298 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
#!/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
|