Skip to content

Commit b78b6e5

Browse files
Add all env markers to screwdrivercd_install_deps documentation (#104)
* Create 5.doc.md * Update Install_Dependencies.md * Update Install_Dependencies.md
1 parent d19a43a commit b78b6e5

2 files changed

Lines changed: 22 additions & 8 deletions

File tree

changelog.d/5.doc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add the PEP508 environment markers to the screwdrivercd_install_deps command environment markers table

docs/Install_Dependencies.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,30 @@ All the package tools have some settings that are common among them, so the same
5555

5656
The deps setting is a list of package dependencies in a format based on the Python [PEP 508](https://www.python.org/dev/peps/pep-0508) Package dependency specification.
5757

58-
The specification used by the `screwdrivercd.installdeps` package adds the following environment markers which contain
58+
The specification used by the `screwdrivercd.installdeps` package adds environment markers which contain
5959
values from the [distro](https://distro.readthedocs.io/en/latest/) package to allow specifying requirements based on
6060
attributes of the Operating System distribution.
6161

62-
| Marker | Python equivalent | Sample values |
63-
| --------------------------------------------------------------------------- | ----------------- | ----------------------------------------------- |
64-
| [distro_codename](https://distro.readthedocs.io/en/latest/#distro.codename) | distro.codename() | Maipo, bionic |
65-
| [distro_id](https://distro.readthedocs.io/en/latest/#distro.id) | distro.id() | rhel, ubuntu, darwin |
66-
| [distro_like](https://distro.readthedocs.io/en/latest/#distro.like) | distro.like() | fedora, debian |
67-
| [distro_name](https://distro.readthedocs.io/en/latest/#distro.name) | distro.name() | Darwin, Red Hat Enterprise Linux Server, Ubuntu |
68-
| [distro_version](https://distro.readthedocs.io/en/latest/#distro.version) | distro.version() | 7.4, 18.04, 18.6.0 |
62+
The environment markers that are supported, are:
63+
64+
| Marker | Python equivalent | Sample values |
65+
| --------------------------------------------------------------------------- | --------------------------------------------- | ----------------------------------------------- |
66+
| [distro_codename](https://distro.readthedocs.io/en/latest/#distro.codename) | distro.codename() | Maipo, bionic |
67+
| [distro_id](https://distro.readthedocs.io/en/latest/#distro.id) | distro.id() | rhel, ubuntu, darwin |
68+
| [distro_like](https://distro.readthedocs.io/en/latest/#distro.like) | distro.like() | fedora, debian |
69+
| [distro_name](https://distro.readthedocs.io/en/latest/#distro.name) | distro.name() | Darwin, Red Hat Enterprise Linux Server, Ubuntu |
70+
| [distro_version](https://distro.readthedocs.io/en/latest/#distro.version) | distro.version() | 7.4, 18.04, 18.6.0 |
71+
| implementation_name | sys.implementation.name | cpython |
72+
| implementation_version | | 3.4.0, 3.5.0b1 |
73+
| os_name | os.name | posix, java |
74+
| platform_machine | platform.machine() | x86_64 |
75+
| platform_python_implementation | platform.python_implementation() | CPython, Jython |
76+
| platform_release | platform.release() | 3.14.1-x86_64-linode39, 14.5.0, 1.8.0_51 |
77+
| platform_system | platform.system() | Linux, Windows, Java |
78+
| platform_version | platform.version() | #1 SMP Fri Apr 25 13:07:35 EDT 2014 Java HotSpot(TM) 64-Bit Server VM, 25.51-b03, Oracle Corporation Darwin Kernel Version 14.5.0: Wed Jul 29 02:18:53 PDT 2015; root:xnu-2782.40.9~2/RELEASE_X86_64 |
79+
| python_version | '.'.join(platform.python_version_tuple()[:2]) | 3.4, 2.7 |
80+
| python_full_version | platform.python_version() | 3.4.0, 3.5.0b1 |
81+
| sys_platform | sys.platform | linux, linux2, darwin, java1.8.0_51 (note that "linux" is from Python3 and "linux2" from Python2) |
6982

7083
For example, the snippet below will use the yum tool to install the `foo_python36` package from the foo python rpm repo
7184
if the Operating System version is less than 8.0 and install the `python3` package if the operating system is version

0 commit comments

Comments
 (0)