Package: pipx
Version: 1.1.0-1
Severity: normal
Tags: upstream
X-Debbugs-Cc: [email protected]

The pipx and pip man pages are inconsistent with the behavior in a variety of 
ways. The pip man page shows these options:

===✂------------------------------
  --log-file <path>
         Path to a verbose non-appending log, that only logs failures.  This 
log is active by default at ~/.pip/pip.log.

  --log <path>
         Path to a verbose appending log.  This log is inactive by default.

  --proxy <proxy>
         Specify a proxy in the form [user:passwd@]proxy.server:port.
===✂------------------------------

The pipx tool does not pass along those pip options. I am trying to
update a python app (argos-translate) and recompile it. I followed
this procedure as root in /usr/local/src/argos-translate:

  $ git fetch origin; # to update from this repo: 
https://github.com/argosopentech/argos-translate.git
  $ git merge origin/master
  $ virtualenv env
  $ source env/bin/activate
  $ PIPX_HOME=${prefix:-/opt/}/pipx PIPX_BIN_DIR=${prefix:-/usr/local}/bin pipx 
install --pip-args='--proxy http://127.0.0.1:8118 --log-file 
~/logs/pip-argostranslate.err --log ~/logs/pip-argostranslate.log' 
/usr/local/src/argos-translate

That last command is mostly¹ in accordance with the man page syntax. The output 
is:

===✂------------------------------
usage: pipx [-h] [--version]
            
{install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions}
            ...
pipx: error: unrecognized arguments: --log-file --log 
/root/logs/pip-argostranslate.log /usr/local/src/argos-translate
(env) localhost:/usr/local/src/argos-translate# PIPX_HOME=${prefix:-/opt/}/pipx 
PIPX_BIN_DIR=${prefix:-/usr/local}/bin pipx install --pip-args='--proxy 
http://127.0.0.1:8118 --log-file ~/logs/pip-argostranslate.err --log 
~/logs/pip-argostranslate.log' /usr/local/src/argos-translate
'argostranslate' already seems to be installed. Not modifying existing 
installation in '/opt/pipx/venvs/argostranslate'. Pass '--force'
to force installation.
===✂------------------------------

Those args should be recognised.

Footnotes:

¹ I say “mostly“ because the man page indicates that there should be a
space after “--pip-args”, which is how I wrote the commandline
originally. But the man page is wrong. Someone pointed that out in
2019 but it was never fixed:

  https://github.com/pypa/pipx/issues/204

So that MS Github bug report needs to be reopened by someone who has a
working MS Github account.

-- System Information:
Debian Release: 12.12
  APT prefers oldstable-updates
  APT policy: (990, 'oldstable-updates'), (990, 'oldstable-security'), (990, 
'stable'), (990, 'oldstable'), (500, 'oldoldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-28-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pipx depends on:
ii  python3                     3.11.2-1+b1
ii  python3-argcomplete         2.0.0-1
ii  python3-importlib-metadata  4.12.0-1
ii  python3-packaging           23.0-1
ii  python3-userpath            1.8.0-1
ii  python3-venv                3.11.2-1+b1

Versions of packages pipx recommends:
ii  fonts-font-awesome  5.0.10+really4.7.0~dfsg-4.1
ii  libjs-bootstrap4    4.6.1+dfsg1-4+deb12u1
ii  libjs-highlight.js  9.18.5+dfsg1-2
ii  libjs-jquery        3.6.1+dfsg+~3.5.14-1
ii  libjs-lunr          2.3.9~dfsg-2
ii  mkdocs              1.4.2+dfsg-2

pipx suggests no packages.

-- no debconf information

Reply via email to