Skip to content

Commit

Permalink
docs: Add packaging info
Browse files Browse the repository at this point in the history
This patch adds information on packaging pynitrokey.  The most important
information is the possibility to generate shell completion scripts for
nitropy.
  • Loading branch information
robin-nitrokey committed Oct 30, 2023
1 parent 14f1758 commit 25d6784
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/packaging.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Packaging pynitrokey
====================

When ``pynitrokey`` is packaged for a distribution or a package manager, we recommend that the package provides both the ``pynitrokey`` Python library and the ``nitropy`` executable.
Alternatively, the Python library can be packaged as ``pynitrokey`` and the executable as ``nitropy``.
(Note that we consider splitting ``pynitrokey`` into a library and an executable in a future release.)

Shell completions for Bash, Zsh and Fish can be generated from the ``nitropy`` script::

$ _NITROPY_COMPLETE=bash_source nitropy > nitropy.bash
$ _NITROPY_COMPLETE=zsh_source nitropy > nitropy.zsh
$ _NITROPY_COMPLETE=fish_source nitropy > nitropy.fish

For more information, see the `click documentation`_.

.. _click documentation: https://click.palletsprojects.com/en/8.1.x/shell-completion/

Unfortunately, man pages for ``nitropy`` are currently not available and cannot be generated automatically.

0 comments on commit 25d6784

Please sign in to comment.