Skip to content

Add datafiles package type #4892

Closed
Closed

Description

@joemarshall

🚀 Feature

A package type that just unzips to a given directory on the pyodide filesystem (optionally overwriting directories if they exist)

Motivation

In #4889 I add a package that lets you install the unix timezone database to the right place on your pyodide runtime. You have to import the python package which then copies the timezone data to the right place. It would be nicer to have a way to add a package to pyodide that just installed the files directly to where I want them on the filesystem (/usr/share/zoneinfo)

Alternatives

The alternative is to do it via a python module, as I do in #4889 but this means patching any modules that need it as a dependency to make sure the import the module which is a pain.

Additional context

I hit this in building Apache Arrow - it requires the timezone database to be in the same format and in the place it lives on unix systems, and Arrow maintainers don't want to embed tz data into the Python wheel.

Activity

  1. ryanking13 commented on Jun 28, 2024

    @ryanking13
    Member

    I think supporting data_files (pyodide/micropip#18) can do the trick instead of adding a separate package type. While data_files support in setuptools is deprecated, AFAIK there isn't a standard for installing arbitrary data files (discussion), so probably supporting data_files is the most possible way for us.

  2. ryanking13 commented on Jul 21, 2025

    @ryanking13
    Member

    We've added support for data_files, so I don't think this is needed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions