Commit 187c36a9 authored by Stefan Behnel's avatar Stefan Behnel Committed by Stefan Behnel

remove another reference to the old distutils build (in quickstart!) and...

remove another reference to the old distutils build (in quickstart!) and clarify the description of the Sage notebook a bit
parent b30e4f51
...@@ -33,15 +33,11 @@ Imagine a simple "hello world" script in a file ``hello.pyx``:: ...@@ -33,15 +33,11 @@ Imagine a simple "hello world" script in a file ``hello.pyx``::
The following could be a corresponding ``setup.py`` script:: The following could be a corresponding ``setup.py`` script::
from distutils.core import setup from distutils.core import setup
from distutils.extension import Extension from Cython.Build import cythonize
from Cython.Distutils import build_ext
ext_modules = [Extension("hello", ["hello.pyx"])]
setup( setup(
name = 'Hello world app', name = 'Hello world app',
cmdclass = {'build_ext': build_ext}, ext_modules = cythonize("hello.pyx"),
ext_modules = ext_modules
) )
To build, run ``python setup.py build_ext --inplace``. Then simply To build, run ``python setup.py build_ext --inplace``. Then simply
...@@ -49,12 +45,14 @@ start a Python session and do ``from hello import say_hello_to`` and ...@@ -49,12 +45,14 @@ start a Python session and do ``from hello import say_hello_to`` and
use the imported function as you see fit. use the imported function as you see fit.
Using the Sage notebook
-----------------------
.. figure:: sage.png .. figure:: sage.png
The Sage notebook allows transparently editing and compiling Cython For users of the Sage math distribution, the Sage notebook allows
code simply by typing ``%cython`` at the top of a cell and evaluate transparently editing and compiling Cython code simply by typing
it. Variables and functions defined in a Cython cell imported into ``%cython`` at the top of a cell and evaluate it. Variables and
the running session. functions defined in a Cython cell imported into the running session.
.. [Sage] W. Stein et al., Sage Mathematics Software, http://sagemath.org .. [Sage] W. Stein et al., Sage Mathematics Software, http://sagemath.org
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment