Skip to content

Commit

Permalink
Merge pull request #100 from languitar/feature/improve-installation-docs
Browse files Browse the repository at this point in the history
Explain from-source installation with extras and branch
  • Loading branch information
languitar committed Feb 13, 2021
2 parents 5ff388e + 0c7dd82 commit d18df28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 13 additions & 1 deletion doc/source/installation.rst
Expand Up @@ -71,6 +71,18 @@ Briefly, the following steps can be used to install |project_program| from sourc
.. code-block:: bash
python3 -m venv /opt/autosuspend
/opt/autosuspend/bin/pip install git+https://github.com/languitar/autosuspend.git
/opt/autosuspend/bin/pip install git+https://github.com/languitar/autosuspend.git@<tag or branch>#egg=autosuspend[all]
.. note::

Replace the angle brackets with desired Git tag or branch.
Use ``master`` for the latest development release.

.. note::

The ``all`` in the square brackets ensures that |project_program| is installed with all optional dependencies.
That way all available checks can be used.
In case you only need a subset of optional requirements, replace ``all`` with a comma-separated list of package extras.
The names of these extras can be found in :file:`setup.py`.

Afterwards, copy the systemd_ unit files found in ``/opt/autosuspend/lib/systemd/system/`` to ``/etc/systemd`` and adapt the contained paths to the installation location.
5 changes: 4 additions & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

name = "autosuspend"

version_file = (Path(__file__).absolute().parent / "VERSION")
version_file = Path(__file__).absolute().parent / "VERSION"
lines = version_file.read_text().splitlines()
release = lines[1].strip()

Expand All @@ -32,6 +32,9 @@
extras_require["test"].extend(
{dep for k, v in extras_require.items() if k != "test" for dep in v},
)
extras_require["all"] = list(
{dep for k, v in extras_require.items() if k != "test" for dep in v},
)

setup(
name=name,
Expand Down

0 comments on commit d18df28

Please sign in to comment.