Print correct command for installing a package.
Project description
installcmd
Cross platform package install commands.
I use a lot of cross platform software. One annoying thing about it is that every platform has its own package manager with a unique install command. What's even worse is that sometimes the packages themselves are listed under slightly different names in different repositories. Installcmd solves this by detecting your platform and providing the correct command.
Installation
Install with: pip install installcmd
Usage
installcmdprints the install command, eg.:apt-get installinstallcmd refreshprints the package cache update command, eg.:apt-get updateinstallcmd noninteractiveprints the non-interactive install command, eg.:apt-get install --assume-yesinstallcmd pkgspec foo.ymlprints the correct name of the package for that platform, based on information in thefoo.yml.
Installcmd just prints the command, but it's easy to make your shell execute it:
# Without spec
$ $(installcmd) package-name
# With spec
$ $(installcmd pkgspec docker.yaml)
It's not magic. It searches through a built-in list of commands for various platforms (see contribution guide). The package name specs have to be provided by you (see package specs).
The main use of this is writing portable installation scripts, such as in your dotfiles repo or Dockerfiles. You can let installcmd handle the platform detection logic instead of having to reimplement it again and again, which makes the scripts a lot cleaner.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file installcmd-0.4.7.tar.gz.
File metadata
- Download URL: installcmd-0.4.7.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.60.0 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/1.4.0 colorama/0.4.4 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac3466ae111031cf8f83c495f0b30a043c1b9064e7534f5494b27555945d428d
|
|
| MD5 |
64a1a427c4cbdb3e93a4ad04df828520
|
|
| BLAKE2b-256 |
8c423934b6c8f3914ef2989296f7433e1631ccd60f6f24d4f8b9d32991da2b70
|
File details
Details for the file installcmd-0.4.7-py3-none-any.whl.
File metadata
- Download URL: installcmd-0.4.7-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.60.0 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/1.4.0 colorama/0.4.4 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cbe345b86fb6078ad28dc8437778b41c86e817bc0608c416df7b8726a18a4fb
|
|
| MD5 |
f8bda478990eeef334d235280b39a992
|
|
| BLAKE2b-256 |
b3f4a6c07df770e02ec0a1ef2b2d037b63f75439e59879d981087a3fa49318ad
|