Skip to content

Better wheel hosting solution #3049

Open
@rth

Description

@rth

Now that we have switched to wheels for packages, our current distribution model reaches its limits as it doesn't allow,

  • having multiple available versions of a package for a given Python/Emscripten version
  • have the package accessible as soon as it's built
  • allow users to upload wheels from their CI (e.g. using cibuildwheel once it works).

This issue aims to discuss what an improved hosting solution could look like and evaluate several possible directions. Of course, the question remains whether the added benefits would be worth the extra maintenance effort.

From a usage perspective, I think what we want is a PyPI like mirror, where users (us included) can upload packages with twine using an API key. Internally packages would still be uploaded to the same S3 bucket and distributed via JsDelivr. So the system distributing packages (i.e. S3 + JsDelivr) is separate from the website of the package index. This way we can guarantee very good package availability, even if there is some maintenance downtime time on the package index website.

Aside from the above-listed functionality, I think we would need,

  • the ability to upload files that are not wheels (e.g. .zip files) -> though this needs to be discussed, maybe wrapping those files as wheels would be better
  • users can create accounts to upload their packages -> to be discussed, this would add maintenance cost
  • ability to upload repodata.json ideally without using S3 credentials directly
  • need to figure out what we do with unvendored test packages, so they are still part of the dependency tree but maybe they shouldn't have a separate page

Bonus features,

  • have some way to inject extra information on the package page (e.g. extra comments about what works and what doesn't from the meta.yaml, or automatic package analysis about potentially unsupported functionality)

If we want to use an existing OSS solution, there are the following possibilities,

  • PyPI warehouse: it's fairly specific to PyPI.org, very complex, and is not intended to be used for anything else than PyPI.org
  • devpi
  • pypi-server
  • code behind piwheels
  • custom solution with only the subset of the functionality we need (still a lot of work)

I'll later add below my evaluation of these solutions.

At the same time, we should keep in mind that in the long term wasm/emscripten wheels might be supported by PyPI, so maybe it's not worth spending too much effort on this. However, even if PyPI does support them, it might not include web-specific optimization that we are able to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions