Skip to content

Commit

Permalink
installation
Browse files Browse the repository at this point in the history
  • Loading branch information
npy0 committed May 10, 2020
1 parent d2e67b0 commit 5e77c99
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ __pycache__/
build/
dist/
nanopy/__pycache__/
docs/build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ The wallet has a sub-command, `nanopy-wallet open FILE`, to unlock previously en
Contact me on nano's [forum](https://forum.nano.org/u/npy) (`npy`) or discord (`npy#2928`). You can support the project by reporting any bugs you find and/or submitting fixes/improvements. When submitting pull requests please format the code using `black` (for Python) or `clang-format` (for C).
```
clang-format --style google -i nanopy/*.c
black nanopy nanopy-wallet setup.py travis.py docs/conf.py
black nanopy docs nanopy-wallet setup.py travis.py
```
2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx"]
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# autodoc_member_order = 'bysource'
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
nanopy
======
.. toctree::
:maxdepth: 2

install
npy
rpc

Expand Down
29 changes: 29 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Installation
############
nanopy includes ``C`` extensions for work generation and signing.

.. code-block:: bash
sudo apt-get install gcc python3-dev
pip install nanopy
* Instead of the default (``gcc``), point to another ``C`` compiler by prepending the installation command with ``CC=path/to/c/compiler``.
.. code-block:: bash
CC=path/to/c/compiler pip install nanopy
* When using ``Visual C``, additionally prepend the installation command with ``USE_VC=1``.
.. code-block:: bash
CC=path/to/visual/c USE_VC=1 pip install nanopy
* For GPU, appropriate ``OpenCL ICD`` headers are required.
.. code-block:: bash
sudo apt-get install ocl-icd-opencl-dev nvidia/amd-opencl-icd
* Enable GPU usage by prepending the installation command with ``USE_GPU=1``.
.. code-block:: bash
USE_GPU=1 pip install nanopy

0 comments on commit 5e77c99

Please sign in to comment.