Skip to content

Exported requirements.txt does not include --extra-index-url #22

@fredrikaverpil

Description

@fredrikaverpil
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: RHEL Linux 7.6, Python 3.7.4

  • Poetry version: 1.0.9

Issue

I think I found a bug...
I have two internal repos (the second one requries credentials which I have stored in my pyproject.toml):

[[tool.poetry.source]]
name = "internal-mirror"
url = "https://server/artifactory/api/pypi/pypi-remote/simple"
default = true

[[tool.poetry.source]]
name = "myproject"
url = "https://server/artifactory/api/pypi/myproject-pypi-local/simple"
secondary = true

Poetry successfully installs using both repos, nice!
But when I export to requirements.txt, I only get the --index-url and not the --extra-index-url definitions, which makes this requirements file incomplete and pip is unable to find my secondary repo:

$ poetry export --format requirements.txt --without-hashes --output requirements.txt
--index-url https://server/artifactory/api/pypi/pypi-remote/simple

myproject==3.1.7

To me, this looks like a bug. I would expect that the --extra-index-url would also appear in the exported requirements.txt file, right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions