Skip to content

Commit

Permalink
Update basic.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Aug 30, 2016
1 parent 1f41df1 commit 15935ff
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions doc/examples/basic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,29 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"cell_type": "markdown",
"metadata": {},
"source": [
"autowig.scons('./basic', 'cpp')"
"We need then to install and compile the *C++* library.\n",
"This is done using the `cpp` target in **SCons**."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": false
},
"outputs": [],
"source": [
"import sys"
"autowig.scons('./basic', 'cpp')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Assuming that headers are located in the `'./basic'` forlder, we then parse headers with relevant compilation flags."
"Once the headers habe been installed in the system, we parse headers with relevant compilation flags."
]
},
{
Expand All @@ -65,6 +62,7 @@
},
"outputs": [],
"source": [
"import sys\n",
"asg = autowig.AbstractSemanticGraph()\n",
"asg = autowig.parser(asg, [sys.prefix + '/include/basic/overload.h',\n",
" sys.prefix + '/include/basic/binomial.h'],\n",
Expand Down Expand Up @@ -135,7 +133,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Once the wrappers are written on disk, we need to compile the *Python* bindings using **SCons**."
"Once the wrappers are written on disk, we need to compile the *Python* bindings using the `py` target in **SCons**."
]
},
{
Expand All @@ -149,6 +147,13 @@
"autowig.scons('./basic', 'py')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The *Python* package is now ready to be installed."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -158,7 +163,14 @@
"outputs": [],
"source": [
"import subprocess\n",
"subprocess.check_output(['pip', 'install', '-e', './basic'])"
"subprocess.check_call(['pip', 'install', '-e', './basic'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And we can hereafter use the *C++* library in the *Python* interpreter"
]
},
{
Expand Down

0 comments on commit 15935ff

Please sign in to comment.