We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be nice if there was a fallback method to provide a URL while micropip is unable to find a pure Python wheel.
Currently (while waiting for pyodide/pyodide#5388 to be released), I'm having to do
from packaging.tags import parse_tag # noqa from packaging.version import Version # noqa import micropip # noqa from micropip import transaction # noqa from micropip.wheelinfo import WheelInfo # noqa real_find_wheel = transaction.find_wheel def custom_find_wheel(metadata: Any, req: Any) -> Any: if metadata.name == 'jiter': known_version = Version('0.8.2') if known_version in metadata.releases: tag = 'cp312-cp312-emscripten_3_1_58_wasm32' filename = f'{metadata.name}-{known_version}-{tag}.whl' url = f'https://files.pydantic.run/{filename}' return WheelInfo( name=metadata.name, version=known_version, filename=filename, build=(), tags=frozenset({parse_tag(tag)}), url=url, parsed_url=urlparse(url), ) return real_find_wheel(metadata, req) transaction.find_wheel = custom_find_wheel
Which seems excessively ugly.
I know I could use an index_url, but then:
index_url
The text was updated successfully, but these errors were encountered:
What about using add_mock_package()?
add_mock_package()
Sorry, something went wrong.
@samuelcolvin thank you for this workaround! It means I can support OpenAI until the next version of Pydodide is released.
FYI, your example is missing this: from urllib.parse import urlparse.
from urllib.parse import urlparse
No branches or pull requests
It would be nice if there was a fallback method to provide a URL while micropip is unable to find a pure Python wheel.
Currently (while waiting for pyodide/pyodide#5388 to be released), I'm having to do
Which seems excessively ugly.
I know I could use an
index_url
, but then:The text was updated successfully, but these errors were encountered: