You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
panel@900fb095b4dfe7c3500321ba7fe84f188b08721a on Python 3.12.2
Description of expected behavior and the observed behavior
I would like to specify a custom url for a wheel in pyiodide conversion. In standard Python I can just put the url in the requirements.txt. As panel uses packaging.requirements.Requirement this doesn't work, because the URL is not a valid requirement. This would not be bad if one could use package @ wheelurl. However this fails, because panel passes this as a string to micropip, which doesn't understand this spec and tries to get http://localhost:8000/mywheel@https://localhost:8000/myhweel.whl.
Failed to convert mypanel.py to pyodide target: Requirements parser raised following error: Expected end or semicolon (after name and no valid version specifier)
https://localhost:8000/mywheel.whl
[x ] I may be interested in making a pull request to address this. Likely I will try to convert the Requirements to package specifications accepted by micropip
The text was updated successfully, but these errors were encountered:
flxmr
changed the title
Pyiodide Conversion: requirements.txt not able to deal with wheel-URLS
Pyiodide Conversion: requirements.txt not able to deal with wheel-urls
Apr 24, 2024
philippjfr
changed the title
Pyiodide Conversion: requirements.txt not able to deal with wheel-urls
Pyodide Conversion: requirements.txt not able to deal with wheel-urls
Apr 24, 2024
As pyodide does only provide one set of emscripten-wheels for every version (...) it doesn't make a lot of sense to use formal Requirements at all I would say. Also the "requirements"-files as read by pip don't have to have a Requirement in every line. This is funny and despite the polish shown by the various "you can run Python in the browser"-projects, this seems very toy-like. (also pip is the only implementation of a proper dependency resolver - and that without an API)
ALL software version info
panel@900fb095b4dfe7c3500321ba7fe84f188b08721a
on Python 3.12.2Description of expected behavior and the observed behavior
I would like to specify a custom url for a wheel in pyiodide conversion. In standard Python I can just put the url in the
requirements.txt
. As panel usespackaging.requirements.Requirement
this doesn't work, because the URL is not a valid requirement. This would not be bad if one could usepackage @ wheelurl
. However this fails, because panel passes this as a string to micropip, which doesn't understand this spec and tries to gethttp://localhost:8000/mywheel@https://localhost:8000/myhweel.whl
.According to micropip one should https://micropip.pyodide.org/en/stable/project/api.html#micropip.install only pass package names, http or emfs-urls.
Complete, minimal, self-contained example code that reproduces the issue
where
reqs.txt
looks likeresults in:
Requirements
to package specifications accepted by micropipThe text was updated successfully, but these errors were encountered: