pyscript icon indicating copy to clipboard operation
pyscript copied to clipboard

GitHub URL as a package: "Ignoring because it is not a valid package"

Open ALERTua opened this issue 3 years ago • 1 comments

Hi. Wanted to highlight that requiring a package that is a URL fails with

DEBUG (SyncWorker_0) [custom_components.pyscript] Ignoring 'git+https://github.com/ALERTua/aioedgeos.git@master' because it is not a valid package

ALERTua avatar Sep 22 '22 14:09 ALERTua

My bad I wasn't using PEP 508 format. aioedgeos@git+http://[email protected]/ALERTua/aioedgeos.git@master worked on the pyscript side, but failed on homeassistant side with:

2022-09-22 18:05:38.687 INFO (MainThread) [custom_components.pyscript] Installing the following packages: {'aioedgeos': {'version': '_unpinned_version', 'sources': ['/config/pyscript/requirements.txt'], 'installed_version': None}}
2022-09-22 18:05:42.385 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package aioedgeos: ERROR: Could not find a version that satisfies the requirement aioedgeos (from versions: none)
ERROR: No matching distribution found for aioedgeos
2022-09-22 18:05:45.598 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry pyscript for pyscript
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/pyscript/__init__.py", line 257, in async_setup_entry
    await install_requirements(hass, config_entry, pyscript_folder)
  File "/config/custom_components/pyscript/requirements.py", line 302, in install_requirements
    await async_process_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 60, in async_process_requirements
    await _async_get_manager(hass).async_process_requirements(name, requirements)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 236, in async_process_requirements
    await self._async_process_requirements(name, missing)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 267, in _async_process_requirements
    raise RequirementsNotFound(name, list(failures))
homeassistant.requirements.RequirementsNotFound: Requirements for pyscript not found: ['aioedgeos'].

ALERTua avatar Sep 22 '22 15:09 ALERTua