Check system
Small cli tool that check system environment markers according to PEP 508 and exits with an error if it is not.
It is meant to be used to abort scripts that are run on the "wrong" system, e.g., a compilation of requirements (with pip-compile) run on a different architecture than the intended use of the requirement file.
The whole library is just one file check_system.py.
Usage
$ check-system --help
usage: check-system [-h] [--os-name OS_NAME] [--sys-platform SYS_PLATFORM] [--platform-machine PLATFORM_MACHINE] [--platform-python-implementation PLATFORM_PYTHON_IMPLEMENTATION] [--platform-release PLATFORM_RELEASE] [--platform-system PLATFORM_SYSTEM] [--platform-version PLATFORM_VERSION]
[--python-version PYTHON_VERSION] [--python-full-version PYTHON_FULL_VERSION] [--implementation-name IMPLEMENTATION_NAME] [--implementation-version IMPLEMENTATION_VERSION]
options:
-h, --help show this help message and exit
--os-name OS_NAME
--sys-platform SYS_PLATFORM
--platform-machine PLATFORM_MACHINE
--platform-python-implementation PLATFORM_PYTHON_IMPLEMENTATION
--platform-release PLATFORM_RELEASE
--platform-system PLATFORM_SYSTEM
--platform-version PLATFORM_VERSION
--python-version PYTHON_VERSION
--python-full-version PYTHON_FULL_VERSION
--implementation-name IMPLEMENTATION_NAME
--implementation-version IMPLEMENTATION_VERSION
Example
Run on a Linux laptop
$ check-system --sys-platform linux
$ echo $? # prints last exit code
0
$ check-system --sys-platform windows
Check failed: sys_platform was linux. Checked against: windows
$ echo $?
1
Metadata
Release files for check-system 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| check-system-1.0.0.tar.gz | 4.9 kB | Without provenance | Details for check-system-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| check_system-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for check_system-1.0.0-py3-none-any.whl |
Total release size: 9.7 kB
Release files / check-system-1.0.0.tar.gz
| Download URL | check-system-1.0.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19f300a5461cdd7b443877dba82414f032df02bed49090e68616c2e28714cbcd
|
|
BLAKE2b-256 checksum How to use checksums |
5349b994145dd22afef769c347fd70497089f7b91903731ddf88948a754ecb2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / check_system-1.0.0-py3-none-any.whl
| Download URL | check_system-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10269d86f812b133f899e941a30ca4786242c258647a97baf07d84e00ef26eb2
|
|
BLAKE2b-256 checksum How to use checksums |
ae4cedb32da78b251107abac55852b0834ca2679f86159170ef8d987e1f0a448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for check-system 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.