Wrapper for pipx to add some minor functionality
Project description
PIPXX - Wrapper for pipx to add some minor functionality
Note: This project has been superceded by my
pipxu project which is a new
implementation of pipx that uses
uv.
pipxx is a simple command line utility to wrap the usage of
pipx to provide some minor improved functions. Consider
pipxx a proof of concept of some ideas for pipx.
- Global application installation by root.
- Enhancement of pipx list output.
- Automatic determination of pyenv Python path for install.
- Substitution of current directory with package name for uninstall.
See the description of these enhancements below.
pipxx is merely a wrapper for pipx so takes exactly the same command
line arguments and options. Just run pipxx the same as you would run
pipx. Type pipx or pipx -h to view the usage summary for pipx
(or type pipxx or pipxx -h to see the same usage summary).
The latest version and documentation is available at https://github.com/bulletmark/pipxx.
Enhancement 1: Global application installation by root
pipx is used normally to install applications for a single user. It
can also install applications
globally
as root but that is awkward
because you have to manually set environment variables. pipxx
recognises when it is run as root (or with sudo) and automatically
sets appropriate system global PIPX_BIN_DIR, PIPX_MAN_DIR, and
PIPX_HOME directories for pipx.
E.g. to install application as normal user:
$ pipxx install cowsay
To install application for all users (i.e. globally):
$ sudo pipxx install cowsay
Note, to see the global directories selected by pipxx for your system:
$ sudo pipxx environment
Enhancement 2: Improved pipx list output
pipx list
output lacks some useful information. pipxx adds the following
to the pipx list output:
- The PyPi package name, or source directory, or VCS URL from where the application was installed from,
- Whether the application is installed as editable.
Enhancement 3: Automatic determination of pyenv Python path for install
When installing, you can tell pipx to use a specific version/path of
Python using the --python option. Unfortunately, you have to specify
the full path to the python interpreter you want. Very commonly,
pyenv is used to install multiple
versions of Python.
So to use a specific pyenv Python version with pipx you have to type:
$ pipx install --python ~/.pyenv/versions/3.12.0/bin/python cowsay
With pipxx you merely have to type:
$ pipxx install --python 3.12 cowsay
I.e. pipxx will work out from 3.12 that you want the path
~/.pyenv/versions/3.12.0/bin/python, i.e. the latest 3.12 version
installed at the time of this example. You could alternately type pipxx install --python 3 cowsay, or pipxx install --python 3.12.0 cowsay.
Note the automatically selected path is dependent on your
system/installation and is derived by pipxx from the output of pyenv root.
Actually, --python is a commonly used option but unfortunately pipx
does not provide a short-form option for it. So pipxx also adds -P
as an alias for --python allowing you to simply type:
$ pipxx install -P 3.12 cowsay
Note that pipxx also adds a description of the added pyenv version
option and the added -P alias option to the install --help output.
Enhancement 4: Substitution of current directory with package name for uninstall
Developers often use pipx to install and run an application they are
working on from a local source directory. E.g. for an example
application myapp:
$ pwd
/home/myname/src/myapp
$ pipx install -e .
installed package myapp <...>
To uninstall this application you have to type pipx uninstall myapp.
However, thinking symmetrically, you would expect pipx uninstall .
would suffice. So pipxx adds the ability to do this:
$ pipxx uninstall .
uninstalled myapp!
Installation or upgrade or removal
Note pipxx is on PyPI so just ensure
that pipx is installed then type the
following:
To install:
$ pipx install pipxx
To upgrade:
$ pipx upgrade pipxx
To remove:
$ pipx uninstall pipxx
pipxx requires Python >= 3.7 and requires no 3rd party packages. It
requires that pipx is in your $PATH.
License
Copyright (C) 2023 Mark Blakeney. This program is distributed under the terms of the GNU General Public License. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at http://www.gnu.org/licenses/ for more details.
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 pipxx-1.11.tar.gz.
File metadata
- Download URL: pipxx-1.11.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb5ea2d3e8d4c6796541c1a5c3e2bbf4df98e4d2d83b7829c2d4360df19ee582
|
|
| MD5 |
c431bb57838d581793f22058330c1533
|
|
| BLAKE2b-256 |
6c183f893c553705dd788e16554964c694d05427a7cc53b7f90294b98832f868
|
File details
Details for the file pipxx-1.11-py3-none-any.whl.
File metadata
- Download URL: pipxx-1.11-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb46495a2417ab8d25275ea0b3376fde986eede8dae066007339e812953cc29c
|
|
| MD5 |
e6122cfc64748f3d96238c3bef3b5fae
|
|
| BLAKE2b-256 |
65b3567ddbc7653cc440e4e7dad77dc0aece47d4a47d7b20a2049ed8555167b0
|