Skip to content

Commit 4bf9753

Browse files
authored
Merge pull request #217 from NOSALRO/issue_210
Magnum Python Bindings Installation Instructions
2 parents 3414fcb + 1691291 commit 4bf9753

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-2
lines changed

docs/install/index.html

+10
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,16 @@ <h4 id="installing-magnum">Installing Magnum<a class="headerlink" href="#install
14581458
<a id="__codelineno-2-42" name="__codelineno-2-42" href="#__codelineno-2-42"></a>cmake<span class="w"> </span>-DCMAKE_BUILD_TYPE<span class="o">=</span>Release<span class="w"> </span>-DWITH_DART<span class="o">=</span>ON<span class="w"> </span>-DWITH_EIGEN<span class="o">=</span>ON<span class="w"> </span>..
14591459
<a id="__codelineno-2-43" name="__codelineno-2-43" href="#__codelineno-2-43"></a>make<span class="w"> </span>-j
14601460
<a id="__codelineno-2-44" name="__codelineno-2-44" href="#__codelineno-2-44"></a>sudo<span class="w"> </span>make<span class="w"> </span>install
1461+
<a id="__codelineno-2-45" name="__codelineno-2-45" href="#__codelineno-2-45"></a>
1462+
<a id="__codelineno-2-46" name="__codelineno-2-46" href="#__codelineno-2-46"></a><span class="c1"># Installation of Magnum Python Bindings (some examples use them but this is optional)</span>
1463+
<a id="__codelineno-2-47" name="__codelineno-2-47" href="#__codelineno-2-47"></a><span class="nb">cd</span><span class="w"> </span>/path/to/tmp/folder
1464+
<a id="__codelineno-2-48" name="__codelineno-2-48" href="#__codelineno-2-48"></a>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/mosra/magnum-bindings.git
1465+
<a id="__codelineno-2-49" name="__codelineno-2-49" href="#__codelineno-2-49"></a><span class="nb">cd</span><span class="w"> </span>magnum-bindings
1466+
<a id="__codelineno-2-50" name="__codelineno-2-50" href="#__codelineno-2-50"></a>mkdir<span class="w"> </span>build<span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="nb">cd</span><span class="w"> </span>build
1467+
<a id="__codelineno-2-51" name="__codelineno-2-51" href="#__codelineno-2-51"></a>cmake<span class="w"> </span>..<span class="w"> </span>-DMAGNUM_WITH_PYTHON<span class="o">=</span>ON
1468+
<a id="__codelineno-2-52" name="__codelineno-2-52" href="#__codelineno-2-52"></a>make<span class="w"> </span>-j
1469+
<a id="__codelineno-2-53" name="__codelineno-2-53" href="#__codelineno-2-53"></a><span class="nb">cd</span><span class="w"> </span>src/python
1470+
<a id="__codelineno-2-54" name="__codelineno-2-54" href="#__codelineno-2-54"></a>sudo<span class="w"> </span>python3<span class="w"> </span>setup.py<span class="w"> </span>install
14611471
</code></pre></div>
14621472
<p><strong>For OSX you can also install Magnum via brew:</strong> <code>brew install --HEAD mosra/magnum/corrade &amp;&amp; brew install --HEAD mosra/magnum/magnum &amp;&amp; brew install --HEAD mosra/magnum/magnum-plugins &amp;&amp; brew install --HEAD mosra/magnum/magnum-integration --with-dartsim</code></p>
14631473
<h3 id="compilation-and-running-the-examples">Compilation and running the examples<a class="headerlink" href="#compilation-and-running-the-examples" title="Permanent link">&para;</a></h3>

docs/search/search_index.json

+1-1
Large diffs are not rendered by default.

scripts/install_osx.sh

+11
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WIT
7676
make -j
7777
sudo make install
7878

79+
cd ../..
80+
if [ ! -d "magnum-bindings" ]
81+
then
82+
git clone https://github.com/mosra/magnum-bindings.git
83+
cd magnum-bindings
84+
mkdir build && cd build
85+
cmake .. -DMAGNUM_WITH_PYTHON=ON
86+
make -j
87+
cd src/python
88+
sudo python3 setup.py install
89+
7990
export PATH=/opt/magnum/bin:$PATH
8091
export LD_LIBRARY_PATH=/opt/magnum/lib:$LD_LIBRARY_PATH
8192

scripts/install_ubuntu.sh

+13-1
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,22 @@ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WIT
7676
make -j
7777
sudo make install
7878

79+
cd ../..
80+
if [ ! -d "magnum-bindings" ]
81+
then
82+
git clone https://github.com/mosra/magnum-bindings.git
83+
cd magnum-bindings
84+
mkdir build && cd build
85+
cmake .. -DMAGNUM_WITH_PYTHON=ON
86+
make -j
87+
cd src/python
88+
sudo python3 setup.py install
89+
90+
7991
export PATH=/opt/magnum/bin:$PATH
8092
export LD_LIBRARY_PATH=/opt/magnum/lib:$LD_LIBRARY_PATH
8193

82-
cd ../../..
94+
cd ../../../../..
8395
if [ $CLEAN -ne 0 ]; then
8496
rm -rf temp_robot_dart
8597
fi

src/docs/docs/install.md

+10
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ mkdir build && cd build
9494
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_DART=ON -DWITH_EIGEN=ON ..
9595
make -j
9696
sudo make install
97+
98+
# Installation of Magnum Python Bindings (some examples use them but this is optional)
99+
cd /path/to/tmp/folder
100+
git clone https://github.com/mosra/magnum-bindings.git
101+
cd magnum-bindings
102+
mkdir build && cd build
103+
cmake .. -DMAGNUM_WITH_PYTHON=ON
104+
make -j
105+
cd src/python
106+
sudo python3 setup.py install
97107
```
98108

99109
**For OSX you can also install Magnum via brew:** `brew install --HEAD mosra/magnum/corrade && brew install --HEAD mosra/magnum/magnum && brew install --HEAD mosra/magnum/magnum-plugins && brew install --HEAD mosra/magnum/magnum-integration --with-dartsim`

0 commit comments

Comments
 (0)