Skip to content

Only use hashes in requirements.txt if there are no VCS repositories #69

Description

@sumanthratna
  • I am on the latest Poetry version.

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

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option). (n/a)

  • OS version and name: macOS 10.5.5 Beta

  • Poetry version: 1.0.5

  • Contents of pyproject.toml file:

[tool.poetry]
name = "test-poetry-proj"
version = "0.1.0"
description = "desc"
authors = ["Sumanth Ratna <sumanthratna@gmail.com>"]

[tool.poetry.dependencies]
python = "^3.6.1"
numpy = "^1.18.4"
hyperopt = {git = "https://github.com/hyperopt/hyperopt.git"}


[tool.poetry.dev-dependencies]
pytest = "^5.4.2"

[tool.poetry.scripts]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Issue

When I run poetry export -f requirements.txt > requirements.txt, the resulting requirements.txt file has a bunch of hashes. Unfortunately, that means I can't run pip install -r requirements.txt on another machine, because it returns this error:

ERROR: Can't verify hashes for these requirements because we don't have a way to hash version control repositories:
    hyperopt from git+https://github.com/hyperopt/hyperopt.git#egg=hyperopt (from -r requirements.txt (line 192))

I'm labeling this as a bug report instead of a feature request because this seems like a fault in the way Poetry behaves when exporting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions