Tool for checking that a system is ok
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
check-system-1.0.0.tar.gz
(4.9 kB
view details)
Built Distribution
File details
Details for the file check-system-1.0.0.tar.gz
.
File metadata
- Download URL: check-system-1.0.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19f300a5461cdd7b443877dba82414f032df02bed49090e68616c2e28714cbcd |
|
MD5 | 445d71af23a5349bf2583d95877efbde |
|
BLAKE2b-256 | 5349b994145dd22afef769c347fd70497089f7b91903731ddf88948a754ecb2b |
File details
Details for the file check_system-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: check_system-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10269d86f812b133f899e941a30ca4786242c258647a97baf07d84e00ef26eb2 |
|
MD5 | 0bee8934c37befa9290eca083ed53607 |
|
BLAKE2b-256 | ae4cedb32da78b251107abac55852b0834ca2679f86159170ef8d987e1f0a448 |