Commit a5752c7c authored by Michael Davidsaver's avatar Michael Davidsaver

doc

parent f62801c6
...@@ -18,8 +18,8 @@ which functions like the ``build_ext`` command. :: ...@@ -18,8 +18,8 @@ which functions like the ``build_ext`` command. ::
python setup.py build_dso -i python setup.py build_dso -i
python setup.py build_ext -i python setup.py build_ext -i
Usage Applying to your package
----- ========================
The `example/ <https://github.com/mdavidsaver/setuptools_dso/tree/master/example>`_ demonstrates building a non-python library, The `example/ <https://github.com/mdavidsaver/setuptools_dso/tree/master/example>`_ demonstrates building a non-python library,
and linking it with a python extension module. and linking it with a python extension module.
...@@ -29,10 +29,9 @@ pyproject.toml ...@@ -29,10 +29,9 @@ pyproject.toml
To properly support ``pip install ...``, it is recommended to include a To properly support ``pip install ...``, it is recommended to include a
`pyproject.toml <https://www.python.org/dev/peps/pep-0518/>`_ `pyproject.toml <https://www.python.org/dev/peps/pep-0518/>`_
file containing at least: :: file containing at least:
[build-system] .. literalinclude:: ../example/pyproject.toml
requires = ["setuptools", "wheel", "setuptools_dso"]
This ensures that ``setuptools_dso`` is available to be imported by ``setup.py``. This ensures that ``setuptools_dso`` is available to be imported by ``setup.py``.
...@@ -40,15 +39,12 @@ MANIFEST.in ...@@ -40,15 +39,12 @@ MANIFEST.in
^^^^^^^^^^^ ^^^^^^^^^^^
Add a ``MANIFEST.in`` to ensure that ``setup.py sdist`` includes everything necessary Add a ``MANIFEST.in`` to ensure that ``setup.py sdist`` includes everything necessary
for a successful source build. :: for a successful source build.
include pyproject.toml .. literalinclude:: ../example/MANIFEST.in
include src/*.h
include src/*.c
include src/*.cpp
Building a DSO Building a DSO
^^^^^^^^^^^^^^ --------------
.. autofunction:: setup .. autofunction:: setup
...@@ -84,7 +80,7 @@ one :py:class:`DSO` to be linked against others. ...@@ -84,7 +80,7 @@ one :py:class:`DSO` to be linked against others.
eg. ``dsos=['some.lib.foo']`` will result in something like ``gcc ... -L.../some/lib -lfoo``. eg. ``dsos=['some.lib.foo']`` will result in something like ``gcc ... -L.../some/lib -lfoo``.
Building an Extension Building an Extension
^^^^^^^^^^^^^^^^^^^^^ ---------------------
.. autoclass:: Extension .. autoclass:: Extension
...@@ -105,14 +101,14 @@ The named ``DSO`` may be built by the same ``setup.py``, or may already be prese ...@@ -105,14 +101,14 @@ The named ``DSO`` may be built by the same ``setup.py``, or may already be prese
) )
Cython Cython
^^^^^^ ------
.. autofunction:: cythonize .. autofunction:: cythonize
Version 1.3 added a :py:func:`setuptools_dso.cythonize()` wrapper to correctly handle ``Extension(dso=...)``. Version 1.3 added a :py:func:`setuptools_dso.cythonize()` wrapper to correctly handle ``Extension(dso=...)``.
Runtime Runtime
------- =======
Beginning with setuptools-dso 2.0 a file ``*_dsoinfo.py`` will be generated alongside each DSO. Beginning with setuptools-dso 2.0 a file ``*_dsoinfo.py`` will be generated alongside each DSO.
eg. dso ``"mypkg.lib.thelib"`` will create ``mypkg/lib/thelib_dsoinfo.py``. eg. dso ``"mypkg.lib.thelib"`` will create ``mypkg/lib/thelib_dsoinfo.py``.
...@@ -158,7 +154,7 @@ to ensure it always runs before the extension library is loaded. :: ...@@ -158,7 +154,7 @@ to ensure it always runs before the extension library is loaded. ::
fixpath() fixpath()
Use with ctypes Use with ctypes
^^^^^^^^^^^^^^^ ---------------
.. autofunction:: find_dso .. autofunction:: find_dso
......
...@@ -106,8 +106,8 @@ class DSO(_Extension): ...@@ -106,8 +106,8 @@ class DSO(_Extension):
eg. ``{'c':['-DMAGIC']}`` eg. ``{'c':['-DMAGIC']}``
:param str gen_info: Controls generation of "info" module. :param str gen_info: Controls generation of "info" module.
True (default) uses the conventional filename, True (default) uses the conventional filename,
False disableds generation, False disables generation,
or a string to use a specific filename. or a specific filename string.
""" """
def __init__(self, name, sources, def __init__(self, name, sources,
soversion=None, soversion=None,
......
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