diff --git a/docs/accelerating.rst b/docs/accelerating.rst index 5c71b5142d656949629dc2534e32b4e6fa8ad01c..754946ae7fd5982a5c1b745e57fa8810d483389f 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 79d8e00afaf8ac6289d8ac5b29b7f3e4066b4d26..0ea113419691b0e2059d0f56634ba60b87ea9b14 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 1fbf1ffabb65fc21661ac33ffc194bff49fce87e..4cb56d43521baed8d85fdbbe83e24300d950bd90 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 7ca36072e27155593c9058caa4bc3c8d9f22e2a1..873fc57b2ca870412fe76441cf685aa2af73213a 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 0000000000000000000000000000000000000000..740466266551d9e17dd364ed35d7350acae5bdc4 --- /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 +