8000 Install from artifacts repo (with authentication via artifacts keyring) · Issue #1636 · pypa/pipx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Install from artifacts repo (with authentication via artifacts keyring) #1636
Open
@Ogaday

Description

@Ogaday

I've developed an application which is hosted on a private Azure Artifacts Feed. I would expect something like the following would work but it doesn't:

pipx install \
  --preinstall artifacts-keyring \
  --index-url https://pkgs.dev.azure.com/<project>/_packaging/<feed>/pypi/simple/ \
  --pip-args "--extra-index-url https://pypi.org/simple" \
  <package>

(extra index for package dependencies which aren't available in the private feed).

How would this feature be useful?

I'd like to use pipx to install my application rather than pip/poetry etc.

Describe the solution you'd like

Ideally the above, or something more sophisticated would work, but I get the following error (with --verbose):

# pipx >(setup:1110): pipx version is 1.7.1
# pipx >(setup:1111): Default python interpreter is '/home/ogaday/.local/bin/python3.10'
# pipx >(package_name_from_spec:378): Determined package name: <package>
# pipx >(package_name_from_spec:379): Package name determined in 0.0s
# pipx >(create_venv:164): Creating virtual environment
# creating virtual environment...
# pipx >(run_subprocess:175): running /home/ogaday/.local/bin/python3.10 -m venv --without-pip /home/ogaday/.local/pipx/venvs/<package>
# pipx >(run_subprocess:175): running <checking pip's availability>
# pipx >(run_subprocess:175): running /home/ogaday/.local/pipx/venvs/<package>/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
# pipx >(run_subprocess:175): running /home/ogaday/.local/pipx/shared/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
# pipx >(run_subprocess:175): running /home/ogaday/.local/pipx/venvs/<package>/bin/python --version
# pipx >(upgrade_package_no_metadata:442): Upgrading artifacts-keyring
# upgrading artifacts-keyring...
# pipx >(run_subprocess:175): running /home/ogaday/.local/pipx/venvs/<package>/bin/python -m pip --no-input install --upgrade artifacts-keyring
# pipx >(_parsed_package_to_package_or_url:139): cleaned package spec: <package>
# pipx >(install_package:247): Installing <package>
# installing <package>...
# pipx >(run_subprocess:175): running /home/ogaday/.local/pipx/venvs/<package>/bin/python -m pip --no-input install --index-url https://pkgs.dev.azure.com/<project>/_packaging/<feed>/pypi/simple/ --extra-index-url https://pypi.org/simple <package>
# pipx >(subprocess_post_check_handle_pip_error:332): '/home/ogaday/.local/pipx/venvs/<package>/bin/python -m pip --no-input install --index-url https://pkgs.dev.azure.com/<project>/_packaging/<feed>/pypi/simple/ --extra-index-url https://pypi.org/simple <package>' failed
# pipx >(subprocess_post_check_handle_pip_error:347): Fatal error from pip prevented installation. Full pip output in file:
    # /home/ogaday/.local/pipx/logs/cmd_2025-05-15_15.14.59_pip_errors.log

# Some possibly relevant errors from pip install:
    # ERROR: Could not find a version that satisfies the requirement <package> (from versions: none)
    # ERROR: No matching distribution found for <package>

# pipx >(rmdir:56): removing directory /home/ogaday/.local/pipx/venvs/<package>
# Error installing <package>.

Describe alternatives you've considered

Interestingly, if I pipx install from the azure devops git repo (which works), then activate the pipx created venv, uninstall <package>, install artifacts-keyring, then reinstall the package from the private index using pip, it does seem to work.

eg.

pipx uninstall <package>
# uninstalled <package>
pipx install --force "git+ssh://git@ssh.dev.azure.com/v3/<project>/production/<package>"
#   installed package <package>, installed using Python 3.10.8
#   These apps are now globally available
#     - <package>
# done! ✨ 🌟 ✨
source ~/.local/pipx/venvs/<package>/bin/activate
python -m pip uninstall -y <package>
# Found existing installation: ...
# Uninstalling ...
#   Successfully uninstalled ...
python -m pip install artifacts-keyring
# Installing collected packages: artifacts-keyring
# Successfully installed artifacts-keyring-0.4.0
python -m pip install --index-url https://pkgs.dev.azure.com/<project>/_packaging/<feed>/pypi/simple/ --extra-index-url https://pypi.org/simple <package>
# Installing collected packages: <package>
# Successfully installed <package>
<package> --help
# ...

I could be making a mistake somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0