Package: pipxx
PIPXX - Wrapper for pipx to add some minor functionalitypipxxis a simple command line utility to wrap the usage ofpipxto provide some minor improved functions. Considerpipxxa proof of concept of some ideas forpipx.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.pipxxis merely a wrapper forpipxso takes exactly the same command
line arguments and options. Just runpipxxthe same as you would runpipx. Typepipxorpipx -hto view the usage summary forpipx(or typepipxxorpipxx -hto see the same usage summary).The latest version and documentation is available athttps://github.com/bulletmark/pipxx.Enhancement 1: Global application installation by rootpipxis used normally to install applications for a single user. It
can alsoinstall applications
globallyas root but that isawkwardbecause you have to manually set environment variables.pipxxrecognises when it is run as root (or withsudo) and automatically
sets appropriate system globalPIPX_BIN_DIR,PIPX_MAN_DIR, andPIPX_HOMEdirectories forpipx.E.g. to install application as normal user:$pipxxinstallcowsayTo install application for all users (i.e. globally):$sudopipxxinstallcowsayNote, to see the global directories selected bypipxxfor your system:$sudopipxxenvironmentEnhancement 2: Improved pipx list outputpipx listoutput lacks some useful information.pipxxadds the following
to thepipx listoutput:The PyPi package name, or source directory, or VCS URL from where the
application was installed from,Whether the application is installed aseditable.Enhancement 3: Automatic determination of pyenv Python path for installWhen installing, you can tellpipxto use a specific version/path of
Python using the--pythonoption. Unfortunately, you have to specify
the full path to the python interpreter you want. Very commonly,pyenvis used to install multiple
versions of Python.So to use a specific pyenv Python version withpipxyou have to type:$pipxinstall--python~/.pyenv/versions/3.12.0/bin/pythoncowsayWithpipxxyou merely have to type:$pipxxinstall--python3.12cowsayI.e.pipxxwill work out from3.12that you want the path~/.pyenv/versions/3.12.0/bin/python, i.e. the latest3.12version
installed at the time of this example. You could alternately typepipxx install --python 3 cowsay, orpipxx install --python 3.12.0 cowsay.Note the automatically selected path is dependent on your
system/installation and is derived bypipxxfrom the output ofpyenv root.Actually,--pythonis a commonly used option but unfortunatelypipxdoes not provide a short-form option for it. Sopipxxalso adds-Pas an alias for--pythonallowing you to simply type:$pipxxinstall-P3.12cowsayNote thatpipxxalso adds a description of the added pyenv version
option and the added-Palias option to theinstall --helpoutput.Enhancement 4: Substitution of current directory with package name for uninstallDevelopers often usepipxto install and run an application they are
working on from a local source directory. E.g. for an example
applicationmyapp:$pwd/home/myname/src/myapp
$pipxinstall-e.
installedpackagemyapp<...>To uninstall this application you have to typepipx uninstall myapp.
However, thinking symmetrically, you would expectpipx uninstall .would suffice. Sopipxxadds the ability to do this:$pipxxuninstall.
uninstalledmyapp!Installation or upgrade or removalNotepipxx is on PyPIso just ensure
thatpipxis installed then type the
following:To install:$pipxinstallpipxxTo upgrade:$pipxupgradepipxxTo remove:$pipxuninstallpipxxpipxxrequires Python >= 3.7 and requires no 3rd party packages. It
requires thatpipxis in your$PATH.LicenseCopyright (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 athttp://www.gnu.org/licenses/for more details.