|
3 | 3 | [](https://pypi.org/project/PyGObject-stubs) |
4 | 4 |
|
5 | 5 | ## Installation |
6 | | -``` |
7 | | -$ pip install pygobject-stubs |
| 6 | + |
| 7 | +```shell |
| 8 | +pip install pygobject-stubs |
8 | 9 | ``` |
9 | 10 |
|
10 | 11 | ### Configuration |
11 | 12 |
|
12 | | -Some libraries exist in multiple versions like Gtk3/4. As both libraries are |
13 | | -currently imported under the namespace `Gtk` only stubs for one can be installed. |
| 13 | +Some libraries exist in multiple versions like Gtk3/4. |
| 14 | +As both libraries are currently imported under the namespace `Gtk` only stubs for one can be installed. |
14 | 15 |
|
15 | | -You need to decide this at install time either by using the `--config-settings` option |
16 | | -with pip |
| 16 | +You need to decide this at install time either by using the `--config-settings` option with pip: |
17 | 17 |
|
18 | | - $ pip install pygobject-stubs --no-cache-dir --config-settings=config=Gtk3,Gdk3,Soup2 |
| 18 | +```shell |
| 19 | +pip install pygobject-stubs --no-cache-dir --config-settings=config=Gtk3,Gdk3,Soup2 |
| 20 | +``` |
19 | 21 |
|
20 | | -or by setting the `PYGOBJECT_STUB_CONFIG` env variable |
| 22 | +or by setting the `PYGOBJECT_STUB_CONFIG` env variable: |
21 | 23 |
|
22 | | - $ PYGOBJECT_STUB_CONFIG=Gtk3,Gdk3,Soup2 pip install --no-cache-dir pygobject-stubs |
| 24 | +```shell |
| 25 | +PYGOBJECT_STUB_CONFIG=Gtk3,Gdk3,Soup2 pip install --no-cache-dir pygobject-stubs |
| 26 | +``` |
23 | 27 |
|
24 | 28 | If no configuration is set, the most recent version of each library is installed. |
25 | 29 |
|
26 | | -`--no-cache-dir` is only necessary on subsequent reinstalls, otherwise the stubs will not |
27 | | -be rebuild and a cache of a previous installation is used. |
| 30 | +`--no-cache-dir` is only necessary on subsequent reinstalls, otherwise the stubs will not be rebuild and a cache of a previous installation is used. |
28 | 31 |
|
29 | 32 | ### Project Integration |
30 | 33 |
|
31 | 34 | Usually you want the stubs to be installed as part of the development dependencies. |
32 | 35 | `pyproject.toml` does not allow to pass `config-settings` to requirements. |
33 | | -If you need specific versions of some libraries you can use a `requirements.txt` file instead, which |
34 | | -allows to pass `config-settings` per requirement as of pip >= 23.1.0. |
| 36 | +If you need specific versions of some libraries you can use a `requirements.txt` file instead, which allows to pass `config-settings` per requirement as of pip >= 23.1.0. |
35 | 37 |
|
36 | | - $ pip install . -r dev.txt |
| 38 | +```shell |
| 39 | +pip install . -r dev.txt |
| 40 | +``` |
37 | 41 |
|
38 | 42 | ## Contributing |
39 | 43 |
|
|
0 commit comments