bulletmark / pipxu

Install and Run Python Applications in Isolated Environments using UV
101 stars 1 forks source link

error: unrecognized arguments: --index-url #1

Closed anderssonjohan closed 7 months ago

anderssonjohan commented 7 months ago

To install a tool from a custom index url I use the following with pipx:

pipx install some-great-tool -i https://myserver/custom/simple/
pipx install some-great-tool --index-url https://myserver/custom/simple/

Current behavior

$ pipxu install some-great-tool --index-url https://myserver/custom/simple/
usage: pipxu [-h] [--uv uv_path] [-m] [--home HOME] [--bin-dir BIN_DIR] [--man-dir MAN_DIR] [--default-python DEFAULT_PYTHON] [-V]
             {debug,inject,install,list,reinstall-all,reinstall,runpip,uninject,uninstall-all,uninstall,upgrade-all,upgrade,version} ...
pipxu: error: unrecognized arguments: --index-url https://myserver/custom/simple/

Expected behavior

Package installed from custom index server

bulletmark commented 7 months ago

This is not really a bug. There are many pipx options not implemented and --index-url is one of them so should have raised it as a "request" or "enhancement". You can inject packages with a different index-url so I would need to track the index-url per package which is really messy and so not being a main use-case I originally decided to not add that option.

However, with commit 7f4ce38ff45def7400c9e599e95465c489166598 I decided to add the option just for install (and upgrade and reinstall). However, it is not supported for inject. If you inject a package into an app then the inject will use the same index-url as used for the original install. That was not difficult to add and it is at least better than not offering the option at all. If you upgrade or reinstall a package then it will use the same index-url as used for the original install.

The change is included in version 1.9.