1
Fork 0
mirror of https://github.com/Steffo99/cfig.git synced 2024-11-21 23:44:21 +00:00
cfig/docs/installation.rst

84 lines
1.7 KiB
ReStructuredText
Raw Normal View History

2022-04-20 20:29:40 +00:00
############
Installation
############
You can install :mod:`cfig` in multiple ways!
.. note::
The CLI tools are not included by default in the package, but are distributed as an `extra <https://stackoverflow.com/questions/52474931/what-is-extra-in-pypi-dependency>`_.
This page refers to the installation with the ``[cli]`` extra, but you may omit to install it if you do not intend to provide the CLI to users.
.. warning::
Never install packages outside :mod:`venv`\ s, unless you know very well what you're doing!
2022-04-20 20:29:40 +00:00
From PyPI
=========
:mod:`cfig` is distributed through the `Python Package Index`_, and you can install it with your favourite dependency manager!
.. _Python Package Index: https://pypi.org/
Using pip
---------
You can install :mod:`cfig` through :mod:`pip`:
.. code-block:: console
2022-04-20 23:32:20 +00:00
$ pip install cfig[cli]
2022-04-20 20:29:40 +00:00
.. note::
If you're working on a project, remember to add it to your ``requirements.txt`` file!
Using Poetry
------------
You can install :mod:`cfig` through :mod:`poetry`:
.. code-block:: console
2022-04-20 23:32:20 +00:00
$ poetry add cfig[cli]
2022-04-20 20:29:40 +00:00
From source
===========
If you have the source of :mod:`cfig`, you can install it from its own folder!
Using PEP 518
-------------
Introduced with :pep:`518`, :mod:`pip` supports automatic build and installation:
.. code-block:: console
$ cd cfig
2022-04-20 23:32:20 +00:00
$ pip install .[cli]
2022-04-20 20:29:40 +00:00
For development
===============
If you want to contribute to :mod:`cfig`, you can use :mod:`poetry` to install the project in "development" mode in an isolated environment:
.. code-block:: console
$ cd cfig
2022-04-20 23:32:20 +00:00
$ poetry install -E cli
2022-04-20 20:29:40 +00:00
.. hint::
Setting ``virtualenvs.in-project`` to :data:`True` is recommended!
.. code-block:: console
$ poetry config virtualenvs.in-project true