aboutsummaryrefslogtreecommitdiffstats
path: root/doc/quick_start/python/index.rst
blob: 83aea7db5e6190dedd5ef8b54289b2c51da0b436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.. program:: ghdl
.. _USING:QuickStart:Python:

Python Interfaces
#################

Currently, pyGHDL is not distributed through PyPI. Therefore, users need to install it from the git repository. However, the
version of the sources must be compatible with the installed version of GHDL (and the shared library ``libghdl``).
Installing from ``master`` is discouraged, because it might contain changes to the internal AST. Instead, ``ghdl version hash``
allows getting the commit hash of the version the installed binary was built from. Since ``pip`` allows installing packages
by providing the URL to the git repo, this is the recommended installation procedure:

.. code-block::

   pip install git+https://github.com/ghdl/ghdl.git@$(ghdl version hash)

.. _CMDREF:

Language Server
***************

When installed through ``pip``, pyGHDL provides executable entrypoints registered in the search PATH, such as ``ghdl-ls``.

.. #
   This files requires a Python module called 'AutoProgram' to be located in the
   'doc' root folder. It expects a variable 'parser' of type ArgumentParser.

.. _CMDREF-ghdlls:

.. autoprogram:: AutoProgram:lsp_parser
   :prog: ghdl-ls
   :groups:
   :label: CmdRef:ghdlls:
51 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339