Commit 53f29f6b authored by Stefan Behnel's avatar Stefan Behnel

Merge branch 'master' of git+ssh://github.com/cython/cython

parents c3332126 cd72257c
...@@ -127,7 +127,7 @@ pygments_style = 'sphinx' ...@@ -127,7 +127,7 @@ pygments_style = 'sphinx'
todo_include_todos = True todo_include_todos = True
# intersphinx for standard :keyword:s (def, for, etc.) # intersphinx for standard :keyword:s (def, for, etc.)
intersphinx_mapping = {'python': ('http://docs.python.org/3/', None)} intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)}
# If true, keep warnings as "system message" paragraphs in the built documents. # If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False #keep_warnings = False
......
...@@ -51,7 +51,8 @@ system, for example, it might look similar to this:: ...@@ -51,7 +51,8 @@ system, for example, it might look similar to this::
(``gcc`` will need to have paths to your included header files and paths (``gcc`` will need to have paths to your included header files and paths
to libraries you want to link with.) to libraries you want to link with.)
After compilation, a ``yourmod.so`` file is written into the target directory After compilation, a ``yourmod.so`` (:file:`yourmod.pyd` for Windows)
file is written into the target directory
and your module, ``yourmod``, is available for you to import as with any other and your module, ``yourmod``, is available for you to import as with any other
Python module. Note that if you are not relying on ``cythonize`` or distutils, Python module. Note that if you are not relying on ``cythonize`` or distutils,
you will not automatically benefit from the platform specific file extension you will not automatically benefit from the platform specific file extension
......
...@@ -23,7 +23,8 @@ the Cython version -- Cython uses ".pyx" as its file suffix. ...@@ -23,7 +23,8 @@ the Cython version -- Cython uses ".pyx" as its file suffix.
.. literalinclude:: ../../examples/tutorial/numpy/convolve_py.py .. literalinclude:: ../../examples/tutorial/numpy/convolve_py.py
This should be compiled to produce :file:`yourmod.so` (for Linux systems). We This should be compiled to produce :file:`yourmod.so` (for Linux systems, on Windows
systems, it will be :file:`yourmod.pyd`). We
run a Python session to test both the Python version (imported from run a Python session to test both the Python version (imported from
``.py``-file) and the compiled Cython module. ``.py``-file) and the compiled Cython module.
......
...@@ -147,7 +147,8 @@ Cython version -- Cython uses ".pyx" as its file suffix. ...@@ -147,7 +147,8 @@ Cython version -- Cython uses ".pyx" as its file suffix.
.. literalinclude:: ../../examples/userguide/numpy_tutorial/convolve_py.py .. literalinclude:: ../../examples/userguide/numpy_tutorial/convolve_py.py
:linenos: :linenos:
This should be compiled to produce :file:`convolve_cy.so` (for Linux systems). We This should be compiled to produce :file:`convolve_cy.so` (for Linux systems,
on Windows systems, this will be a ``.pyd`` file). We
run a Python session to test both the Python version (imported from run a Python session to test both the Python version (imported from
``.py``-file) and the compiled Cython module. ``.py``-file) and the compiled Cython module.
......
...@@ -533,7 +533,8 @@ possible to declare them in the :file:`setup.py` file:: ...@@ -533,7 +533,8 @@ possible to declare them in the :file:`setup.py` file::
Cython will generate and compile the :file:`rect.cpp` file (from Cython will generate and compile the :file:`rect.cpp` file (from
:file:`rect.pyx`), then it will compile :file:`Rectangle.cpp` :file:`rect.pyx`), then it will compile :file:`Rectangle.cpp`
(implementation of the ``Rectangle`` class) and link both object files (implementation of the ``Rectangle`` class) and link both object files
together into :file:`rect.so`, which you can then import in Python using together into :file:`rect.so` on Linux, or :file:`rect.pyd` on windows,
which you can then import in Python using
``import rect`` (if you forget to link the :file:`Rectangle.o`, you will ``import rect`` (if you forget to link the :file:`Rectangle.o`, you will
get missing symbols while importing the library in Python). get missing symbols while importing the library in Python).
......
...@@ -618,7 +618,7 @@ class TestBuilder(object): ...@@ -618,7 +618,7 @@ class TestBuilder(object):
test_class = CythonUnitTestCase test_class = CythonUnitTestCase
else: else:
test_class = CythonRunTestCase test_class = CythonRunTestCase
elif mode in ['compile', 'error', 'test']: elif mode in ['compile', 'error']:
test_class = CythonCompileTestCase test_class = CythonCompileTestCase
else: else:
raise KeyError('Invalid test mode: ' + mode) raise KeyError('Invalid test mode: ' + mode)
......
# mode: test # mode: run
def f(x, y): def f(x, y):
x = y x = y
......
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