From 2d3c6002e5119294156b62729303d37634ee2184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Mon, 29 Mar 2021 13:41:47 +0200 Subject: [PATCH] fixed docs --- docs/accelerating.rst | 9 ++++++--- docs/conf.py | 3 ++- docs/index.rst | 1 + docs/usage.rst | 35 ----------------------------------- docs/utilities.rst | 37 +++++++++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 39 deletions(-) create mode 100644 docs/utilities.rst diff --git a/docs/accelerating.rst b/docs/accelerating.rst index 5c71b51..754946a 100644 --- a/docs/accelerating.rst +++ b/docs/accelerating.rst @@ -1,8 +1,8 @@ Accelerating builds =================== -distutils by default compiles using a single process. To enable faster, multiprocess compilations -just type: +distutils by default compiles using a single process. +To enable faster, multiprocess compilations just use: .. code-block:: python @@ -10,5 +10,8 @@ just type: monkey_patch_parallel_compilation() -Before your :code:`setup()` call. +In your :code:`setup.py` before your call to :code:`setup()`. +It is also used in example_ so you can just copy that. + +.. _example: https://github.com/smok-serwis/snakehouse/blob/develop/example/setup.py diff --git a/docs/conf.py b/docs/conf.py index 79d8e00..0ea1134 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,8 +21,9 @@ project = 'snakehouse' copyright = '2020-2021 SMOK sp. z o. o.' author = 'Piotr MaĹlanka' +from snakehouse import __version__ # The full version, including alpha/beta/rc tags -release = '1.4' +release = __version__ # -- General configuration --------------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index 1fbf1ff..4cb56d4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,6 +6,7 @@ Welcome to snakehouse's documentation! :caption: Contents: usage + utilities accelerating diff --git a/docs/usage.rst b/docs/usage.rst index 7ca3607..873fc57 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -34,38 +34,3 @@ Full pydoc of :code:`Multibuild` and :code:`build` is here You should use :code:`dont_snakehouse` for debugging and unit tests, as snakehouse has a sad tendency to dump core on unhandled exceptions. To prevent that from happening remember to handle your exceptions and debug using this flag. - -Helper functions ----------------- - -Finding files -~~~~~~~~~~~~~ - -Instead of manually specifying list of pyx and c files to compile you can use the following -functions: - -.. autofunction:: snakehouse.find_pyx - -.. autofunction:: snakehouse.find_c - -.. autofunction:: snakehouse.find_pyx_and_c - -Specifying requirements -~~~~~~~~~~~~~~~~~~~~~~~ - -If you add a MANIFEST.in file with contents: - -.. code-block:: - - include requirements.txt - -Then you can write the following in your setup.py: - -.. code-block:: python - - from snakehouse import read_requirements_txt - - setup(install_requires=read_requirements_txt()) - -.. autofunction:: snakehouse.read_requirements_txt - diff --git a/docs/utilities.rst b/docs/utilities.rst new file mode 100644 index 0000000..7404662 --- /dev/null +++ b/docs/utilities.rst @@ -0,0 +1,37 @@ +Helper functions +================ + +Snakehouse contains a bunch of functions to help you with everyday work. They are +meant to be primarily used in your :code:`setup.py`. + +Finding files +~~~~~~~~~~~~~ + +Instead of manually specifying list of pyx and c files to compile you can use the following +functions: + +.. autofunction:: snakehouse.find_pyx + +.. autofunction:: snakehouse.find_c + +.. autofunction:: snakehouse.find_pyx_and_c + +Specifying requirements +~~~~~~~~~~~~~~~~~~~~~~~ + +If you add a MANIFEST.in file with contents: + +.. code-block:: + + include requirements.txt + +Then you can write the following in your setup.py: + +.. code-block:: python + + from snakehouse import read_requirements_txt + + setup(install_requires=read_requirements_txt()) + +.. autofunction:: snakehouse.read_requirements_txt + -- GitLab