Skip to content

Commit

Permalink
Update installation instructions to use poetry (#1259)
Browse files Browse the repository at this point in the history
* Update installation instructions to use poetry

* Remove non-accessible modules from api toc
  • Loading branch information
rytilahti authored Dec 15, 2021
1 parent 8283b22 commit 8c41748
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 80 deletions.
8 changes: 1 addition & 7 deletions docs/api/miio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Subpackages
:maxdepth: 4

miio.gateway
miio.integrations

Submodules
----------
Expand Down Expand Up @@ -44,7 +45,6 @@ Submodules
miio.device
miio.deviceinfo
miio.discovery
miio.dreamevacuum_miot
miio.exceptions
miio.extract_tokens
miio.fan
Expand All @@ -63,22 +63,16 @@ Submodules
miio.powerstrip
miio.protocol
miio.pwzn_relay
miio.roidmivacuum_miot
miio.scishare_coffeemaker
miio.toiletlid
miio.updater
miio.utils
miio.vacuum
miio.vacuum_cli
miio.vacuum_tui
miio.vacuumcontainers
miio.viomivacuum
miio.walkingpad
miio.waterpurifier
miio.waterpurifier_yunmi
miio.wifirepeater
miio.wifispeaker
miio.yeelight
miio.yeelight_dual_switch

Module contents
Expand Down
38 changes: 30 additions & 8 deletions docs/discovery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,40 @@ Getting started
Installation
============

The easiest way to install the package is to use pip:
``pip3 install python-miio`` . `Using
virtualenv <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`__
is recommended.
You can install the most recent release using pip:

.. code-block:: console
Please make sure you have ``libffi`` and ``openssl`` headers installed, you can
do this on Debian-based systems (like Rasperry Pi) with
pip install python-miio
.. code-block:: bash
apt-get install libffi-dev libssl-dev
Alternatively, you can clone this repository and use poetry to install the current master:

.. code-block:: console
git clone https://github.com/rytilahti/python-miio.git
cd python-miio/
poetry install
This will install python-miio into a separate virtual environment outside of your regular python installation.
You can then execute installed programs (like ``miiocli``):

.. code-block:: console
poetry run miiocli --help
.. tip::

If you want to execute more commands in a row, you can activate the
created virtual environment to avoid typing ``poetry run`` for each
invocation:

.. code-block:: console
poetry shell
miiocli --help
miiocli discover
Device discovery
================
Expand Down
Loading

0 comments on commit 8c41748

Please sign in to comment.