-
-
Notifications
You must be signed in to change notification settings - Fork 551
Milestone
Description
ALL software version info
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
.
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
panel convert mypanel.py --compiled --to pyodide-worker --out pyodide-excel --requirements reqs.txt
where reqs.txt
looks like
http://localhost:8000/mywheel.whl
results in:
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