1.. program:: ghdl
2.. _USING:QuickStart:Python:
3
4Python Interfaces
5#################
6
7Currently, pyGHDL is not distributed through PyPI. Therefore, users need to install it from the git repository. However, the
8version of the sources must be compatible with the installed version of GHDL (and the shared library ``libghdl``).
9Installing from ``master`` is discouraged, because it might contain changes to the internal AST. Instead, ``ghdl version hash``
10allows getting the commit hash of the version the installed binary was built from. Since ``pip`` allows installing packages
11by providing the URL to the git repo, this is the recommended installation procedure:
12
13.. code-block::
14
15   pip install git+https://github.com/ghdl/ghdl.git@$(ghdl version hash)
16
17.. _CMDREF:
18
19Language Server
20***************
21
22When installed through ``pip``, pyGHDL provides executable entrypoints registered in the search PATH, such as ``ghdl-ls``.
23
24.. #
25   This files requires a Python module called 'AutoProgram' to be located in the
26   'doc' root folder. It expects a variable 'parser' of type ArgumentParser.
27
28.. _CMDREF-ghdlls:
29
30.. autoprogram:: AutoProgram:lsp_parser
31   :prog: ghdl-ls
32   :groups:
33   :label: CmdRef:ghdlls:
34