Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools_dso
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
setuptools_dso
Commits
a5752c7c
Commit
a5752c7c
authored
Mar 14, 2021
by
Michael Davidsaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc
parent
f62801c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
documentation/usage.rst
documentation/usage.rst
+11
-15
src/setuptools_dso/dsocmd.py
src/setuptools_dso/dsocmd.py
+2
-2
No files found.
documentation/usage.rst
View file @
a5752c7c
...
...
@@ -18,8 +18,8 @@ which functions like the ``build_ext`` command. ::
python setup.py build_dso -i
python setup.py build_ext -i
Us
age
-----
Applying to your pack
age
========================
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.
...
...
@@ -29,10 +29,9 @@ pyproject.toml
To properly support ``pip install ...``, it is recommended to include a
`pyproject.toml <https://www.python.org/dev/peps/pep-0518/>`_
file containing at least:
::
file containing at least:
[build-system]
requires = ["setuptools", "wheel", "setuptools_dso"]
.. literalinclude:: ../example/pyproject.toml
This ensures that ``setuptools_dso`` is available to be imported by ``setup.py``.
...
...
@@ -40,15 +39,12 @@ MANIFEST.in
^^^^^^^^^^^
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
include src/*.h
include src/*.c
include src/*.cpp
.. literalinclude:: ../example/MANIFEST.in
Building a DSO
^^^^^^^^^^^^^^
--------------
.. autofunction:: setup
...
...
@@ -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``.
Building an Extension
^^^^^^^^^^^^^^^^^^^^^
---------------------
.. autoclass:: Extension
...
...
@@ -105,14 +101,14 @@ The named ``DSO`` may be built by the same ``setup.py``, or may already be prese
)
Cython
^^^^^^
------
.. autofunction:: cythonize
Version 1.3 added a :py:func:`setuptools_dso.cythonize()` wrapper to correctly handle ``Extension(dso=...)``.
Runtime
-------
=======
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``.
...
...
@@ -158,7 +154,7 @@ to ensure it always runs before the extension library is loaded. ::
fixpath()
Use with ctypes
^^^^^^^^^^^^^^^
---------------
.. autofunction:: find_dso
...
...
src/setuptools_dso/dsocmd.py
View file @
a5752c7c
...
...
@@ -106,8 +106,8 @@ class DSO(_Extension):
eg. ``{'c':['-DMAGIC']}``
:param str gen_info: Controls generation of "info" module.
True (default) uses the conventional filename,
False disable
d
s generation,
or a s
tring to use a specific filename
.
False disables generation,
or a s
pecific filename string
.
"""
def
__init__
(
self
,
name
,
sources
,
soversion
=
None
,
...
...
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