python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.72k stars 2.27k forks source link

Can you install a private package hosted in Gitlab? #9713

Closed aleenprd closed 1 month ago

aleenprd commented 1 month ago

Issue Kind

Change in current behaviour

Description

Not sure if this feature already exists and I can't figure it our or if gitlab won't work but:

[project]
name = "goat"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
    "pandas>=2.2.3",
    "ruff>=0.6.8",
]

[tool.uv]
# see https://docs.astral.sh/uv/reference/settings/
extra-index-url = [
        "https://***:***@gitlab.***/api/v4/projects/***/packages/pypi/simple"
]

I tried the above and then uv add mypackage but I get the error:

  × No solution found when resolving dependencies for split (python_full_version == '3.10.*'):
  ╰─▶ Because mypackage was not found in the package registry and your project depends on
      mypackage==0.1.0, we can conclude that your project's requirements are unsatisfiable.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip
        locking and syncing.

Impact

It would allow people to add private packages which in a professional setting is a must

Workarounds

Use poetry lol?

Secrus commented 1 month ago

Pretty sure you wanted to post that in the uv repo. For what it's worth, I am pretty sure that uv can install a package from gitlab.

aleenprd commented 1 month ago

Big whoops

github-actions[bot] commented 2 weeks ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.