Releases: tradebyte/paci
v1.5.1
Fixes the run_cmd
command in the library to use in INSTALL.sh
or UPDATE.sh
scripts.
Now it will actually fail if the command which is checked fails.
v1.5.0
Expose the cwd
feature from v1.4.0 to the run_cmd
function.
This let's you set the working directory via the run_cmd
command as well.
See v1.4.0
for more details how this works.
v1.4.0
It this version an option was added to the library to use in INSTALL.sh
or UPDATE.sh
scripts.
The function sh(cmd)
now takes an optional argument cwd
. This sets the working directory in which the command will be executed.
So you can use it like this:
from paci.helpers import cli_helper as cli
print(cli.sh("echo $PWD"))
print(cli.sh("echo $PWD", cwd="/tmp"))
print(cli.sh("echo $PWD"))
Which will output:
/home/nih/github/paci
/tmp
/home/nih/github/paci
v1.3.0
This version provides a new module to use in INSTALL.sh
or UPDATE.sh
scripts.
You can use #!/usr/bin/env python3
(Ubuntu 16.04) or #!/usr/bin/env python
(Ubuntu 17.10) at the top of the file to use python.
To use the functions provided by this module you need to import it like this:
from paci.helpers import cli_helper as cli
After importing it you can use the following functions:
sh(cmd)
- Runs a command and returns it's outputwithout_keys(dictionary, keys)
- Filters a dict and returns it. Everything in the keys list is filtered out.abort_script(msg)
- Aborts the script and outputs a message.symbol(name)
- Helper function to print symbols.print_heading(icon, text)
- Helper function to print a heading.ask_with_default(question, default)
- Helper function to get input from the use and if enter is pressed use the default.ask_yes_no(question, default="yes")
- Helper function to ask a yes/no question.run_cmd(msg, cmd, ok_msg="", err_msg="", exit_msg="", exit_all=False)
- Helper function to execute a command and use spinners.check_version(msg, name, desired_version, current_version)
- Checks if a version is sufficient.
Example:
from paci.helpers import cli_helper as cli
cli.run_cmd("Checking if Vagrant is installed...",
['which', 'vagrant'],
ok_msg="Vagrant is installed.",
exit_msg="Vagrant needs to be installed.",
exit_all=True)
Will output:
✔ Vagrant is installed.
v1.2.1
This version contains the following changes:
- Fix display of script executions
v1.2.0
This version contains the following changes:
- Adds the ability to silence the output of
paci configure
command via--silent
(only when using--no-choice
)
v1.1.0
This version contains the following changes:
- Adds the ability to provide default registries for the
paci configure
command via:--main-registry=<url>
--fallback-registry=<url>
- Adds the ability to skip the input process of the
paci configure
command via--no-choice
- Adds an install script
- Minor cleanup of files
v1.0.2
Fixes the following installation issue:
❯ pip3 install paci
Collecting paci
Downloading paci-1.0.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-5mppilrk/paci/setup.py", line 14, in <module>
with open("LICENSE") as f:
File "/usr/lib/python3.5/codecs.py", line 895, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'LICENSE'
v1.0.1
Fixes installation issue.
v1.0.0 - First public release
This is our first release. It has all functionality described in the --help
function.
❯ paci --help
paci
Usage:
paci install [--no-config] [--no-cleanup] [--reuse] [--overwrite] <package>...
paci update [--no-config] [--no-cleanup] [--reuse] [--overwrite] <package>...
paci search <package>
paci refresh
paci list
paci remove
paci configure
paci generate (repo-index <path> | pkg-index)
paci --help
paci --version
Options:
-h, --help Show this screen.
-v, --version Show version.
-n, --no-config Omits the config.
-c, --no-cleanup Don't cleanup the mess.
-o, --overwrite Overwrite the config.
-r, --reuse Reuse the downloaded files.
(only possible with --no-cleanup)