Correct syntax for requirements in manifest.json?

Hi all,
I want to pick up a requirement from git rather than PyPI as documented here: https://developers.home-assistant.io/docs/creating_integration_manifest/#custom-requirements-during-development--testing
In my manifest.json I’m putting:

"requirements": ["git+https://github.com/MirandaPoth/nhc2a-coco.git#nhc2a-coco=0.0"],

My log shows the following error:
pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at “’+https:/’”: Expected stringEnd

What am I doing wrong?

You did not specify a branch:

"requirements": ["git+https://github.com/MirandaPoth/nhc2a-coco.git@master#nhc2a-coco=0.0"
1 Like

Thanks very much! Also I think there should be two equals signs?

Yes, you are right :+1:

1 Like

A custom component I wrote recently broke because of an error in a dependency.
I get this error:

Unable to install package git+https://github.com/GrocerCheck/LivePopularTimes@master#LivePopularTimes==1.1: ERROR: Could not find a version that satisfies the requirement calendar (from LivePopularTimes==1.1) (from versions: none) ERROR: No matching distribution found for calendar (from LivePopularTimes==1.1) WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available. You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

I see that the author has recently updated to version 1.1, but changing the dependency url in manifest.json does not solve the error.

The contents of manifest.json are:

{
    "domain": "populartimes",
    "name": "Popular Times",
    "documentation": "",
    "dependencies": [],
    "codeowners": ["@freakshock88"],
    "requirements": ["git+https://github.com/GrocerCheck/LivePopularTimes@master#LivePopularTimes==1.1"]
  }

Any idea why this is failing? I do notice there are no releases or tags active on the repo.
I tried removing the branch or version part of the URL but that also results in invalid URL errors.

I also tried forking the dependency repo and adding a release tag, but also that does not work and results in the same error above.