Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
73e83c24
Commit
73e83c24
authored
Apr 08, 2018
by
scoder
Committed by
GitHub
Apr 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2184 from jkleckner/add-no_zip_safe-to-documentation
Add zip_safe=False to userguide setup.py
parents
59f26d18
f4d03b3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
docs/src/quickstart/build.rst
docs/src/quickstart/build.rst
+6
-0
docs/src/reference/compilation.rst
docs/src/reference/compilation.rst
+12
-0
docs/src/userguide/sharing_declarations.rst
docs/src/userguide/sharing_declarations.rst
+5
-0
No files found.
docs/src/quickstart/build.rst
View file @
73e83c24
...
...
@@ -56,6 +56,12 @@ To build, run ``python setup.py build_ext --inplace``. Then simply
start a Python session and do ``from hello import say_hello_to`` and
use the imported function as you see fit.
One caveat if you use setuptools instead of distutils, the default
action when running ``python setup.py install`` is to create a zipped
``egg`` file which will not work with ``cimport`` for ``pxd`` files
when you try to use them from a dependent package.
To prevent this, include ``zip_safe=False`` in the arguments to ``setup()``.
.. _jupyter-notebook:
Using the Jupyter notebook
...
...
docs/src/reference/compilation.rst
View file @
73e83c24
...
...
@@ -140,6 +140,12 @@ Note that when using setuptools, you should import it before Cython as
setuptools may replace the ``Extension`` class in distutils. Otherwise,
both might disagree about the class to use here.
Note also that if you use setuptools instead of distutils, the default
action when running ``python setup.py install`` is to create a zipped
``egg`` file which will not work with ``cimport`` for ``pxd`` files
when you try to use them from a dependent package.
To prevent this, include ``zip_safe=False`` in the arguments to ``setup()``.
If your options are static (for example you do not need to call a tool like
``pkg-config`` to determine them) you can also provide them directly in your
.pyx or .pxd source file using a special comment block at the start of the file::
...
...
@@ -324,6 +330,12 @@ e.g.::
These ``.pxd`` files need not have corresponding ``.pyx``
modules if they contain purely declarations of external libraries.
Remember that if you use setuptools instead of distutils, the default
action when running ``python setup.py install`` is to create a zipped
``egg`` file which will not work with ``cimport`` for ``pxd`` files
when you try to use them from a dependent package.
To prevent this, include ``zip_safe=False`` in the arguments to ``setup()``.
Integrating multiple modules
============================
...
...
docs/src/userguide/sharing_declarations.rst
View file @
73e83c24
...
...
@@ -263,3 +263,8 @@ Some things to note about this example:
doesn't bind the name Shrubbing in Landscaping's module namespace at run
time, so to access :func:`Shrubbing.standard_shrubbery` we also need to
``import Shrubbing``.
* One caveat if you use setuptools instead of distutils, the default
action when running ``python setup.py install`` is to create a zipped
``egg`` file which will not work with ``cimport`` for ``pxd`` files
when you try to use them from a dependent package.
To prevent this, include ``zip_safe=False`` in the arguments to ``setup()``.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment