Wraps pip and venv to install scripts
Project description
PIPIS
tests | |
---|---|
package |
Somewhere between pip and pipsi
"pipis" stands for "pip isolate"
and "pipi" is the french for "peepee" which is a fun name but pipi was already taken…
Actually it is a rewrite of pipsi but with venv instead of virtualenv.
What does it do?
Pipis is a wrapper around venv and pip which installs scripts provided by python packages into separate venvs to shield them from your system and each other.
It creates a venv in ~/.local/venvs/
, update pip, installs the package, and links the package's scripts to ~/.local/bin/
. These directory can be changed respectively through the environment variables PIPIS_VENVS
and PIPIS_BIN
.
Why not pipsi?
Because i do not care about Python 2, and virtualenv
copies python's binaries while venv
just symlink them (which i think is cleaner, but it still copies pip
which is not clean…).
How to install
Automatic
Coming soon…
Manual
Create the pipis venvs and bin directories:
mkdir -p ~/.local/share/pipis/{venvs,bin}
Create and activate the pipis virtual environment:
python3 -m venv ~/.local/share/pipis/venvs/pipis
source ~/.local/share/pipis/venvs/pipis/bin/activate
Upgrade the pip package:
pip install -U pip
Install pipis:
pip install pipis
Exit the virtual environment:
deactivate
Link the pipis script into the "global" bin directory:
ln -s ~/.local/share/pipis/venvs/pipis/bin/pipis ~/.local/share/pipis/bin/
Add the pipis "global" bin directory to your PATH:
export PATH="~/.local/share/pipis/bin:${PATH}"
How to update
pipis update pipis
How to uninstall
pipis uninstall pipis
How to use
Show help
$ pipis --help
Usage: pipis [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
install
list
uninstall
update
You can also invoke --help
on each commands.
Install package(s)
$ pipis install ansible
Do you want to continue? [y/N]: y
Installing [####################################] 100%
You can install multiple packages:
$ pipis install ansible ansible-lint jmespath
Do you want to continue? [y/N]: y
Installing [####################################] 100%
Unattended install package(s)
$ pipis install --yes awscli
Installing [####################################] 100%
Update package(s)
$ pipis update ansible
Do you want to continue? [y/N]: y
Updating [####################################] 100%
You can also update all installed packages at once:
$ pipis update
Do you want to continue? [y/N]: y
Updating [####################################] 100%
List installed packages
$ pipis list
Installed:
- ansible
- ansible-lint
- awscli
- bashate
- docker-compose
- flake8
- jmespath
- pipis
- poetry
- pylint
- python-language-server
- twine
Uninstall package(s)
$ pipis uninstall ansible
Do you want to continue? [y/N]: y
Removing [####################################] 100%
Credits
- Armin Ronacher: the author of pipsi, for the inspiration
- Nicolas Karolak: myself, the author of pipis
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased
Added
- Add
search
command, to search packages on PyPI.
1.5.0
Added
- Add
-I
or--ignore-installed
option oninstall
andupdate
commands. - Add
-U
or--upgrade
option oninstall
command.
Changed
- Move some portion of code into separate functions to make the code easier to read.
- Updating an uninstalled package will install it, instead of failing.
- While creating symlinks, if the target already exists it will be replaced, instead of failing.
Fixed
- Fix some linting warnings.
1.4.0
Added
- Install option
-s
or--system-site-packages
to give access to system site-packages to venv. - Allow to specify package version (ex:
ansible==2.4.0
). - Add a package into a package's venv with
-d
or--dependency
option. - Add
-v
or--verbose
option oninstall
andupdate
commands.
1.3.1
Fixed
- Refactor environment variable retrieval.
1.3.0
Added
- Destination venv directory can be set through the environment variable
PIPIS_VENV
. - Destination bin directory can be set through the environment variable
PIPIS_BIN
.
Changed
- Format
list
output like pip's one.
Fixed
- Remove venv created in case of inexistant package install attempt.
- Raise error when the package is a library (has no user script).
- Raise error when the symlink destination already exists.
- Raise error when trying to update an inexistant package.
1.2.0
Added
- Add
freeze
command to output installed packages in requirements format. - Add command to show pipis version.
Changed
- Show version beside package name in
list
command. - Improve existing and add new help texts.
- Add short from
-y
for--yes
argument. - Factorize duplicate code.
Fixed
- Fix pep8 and pylint warnings.
1.1.0 - 2018-05-18
Added
- Add
-r/--requirement
for theremove
command to allow passingrequirements.txt
file. - Add
-r/--requirement
for theupdate
command to allow passingrequirements.txt
file. - Add
-r/--requirement
for theinstall
command to allow passingrequirements.txt
file.
Changed
- Change output information format fo when package are already/not installed.
1.0.1 - 2018-05-17
Fixed
- Reload
sys.path
and clean it after to avoid issue with "distribution not found".
1.0.0 - 2018-05-17
Added
- Everything.
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
Hashes for pipis-2.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92958b94a811cb77bf204c01d82783cce4056bf52aad2e96f0660138da0a018a |
|
MD5 | 10525c1fc4a077ae4513d9991d84d13e |
|
BLAKE2b-256 | 831a81c5a3a70ead68439c371f53dda49b40f8256633e524d6ff140728df5d55 |