Skip to content

detached does not work with EXTRA_INDEX_URL #1919

@RichardOberdieck

Description

@RichardOberdieck

Description

  • When using detached=true, the EXTRA_INDEX_URL is ignored. Using hatch 1.14.0

To reproduce

  1. hatch new test-detached
  2. Add this to the pyproject.toml
[tool.hatch.envs.default.env-vars]
PIP_INDEX_URL = "https://pypi.python.org/simple/"
PIP_EXTRA_INDEX_URL = <a-private-index>

[tool.hatch.envs.detached]
detached = true
dependencies = ["requests", "click", "pymsteams", "<package-name-only-found-in-extra-index>"]

[tool.hatch.envs.detached.scripts]
checking = "python -m checking {args}"
  1. Run hatch run detached:checking

Result

ERROR: Ignored the following versions that require a different python version: 0.2.5 Requires-Python >=3.9
ERROR: Could not find a version that satisfies the requirement <package-name-only-found-in-extra-index> (from versions: none)
ERROR: No matching distribution found for <package-name-only-found-in-extra-index>

Expected

It should not fail

Workaround

Remove detached=true

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