google / subpar

Subpar is a utility for creating self-contained python executables. It is designed to work well with Bazel.
Apache License 2.0
566 stars 69 forks source link

Allow pkg_resources' resource APIs to be used inside .par files. #52

Closed duggelz closed 6 years ago

duggelz commented 6 years ago

Several limitations apply.

Fixes #38

Partially addresses #43

duggelz commented 6 years ago

CC @yhg1s @gpshead @yilei FYI. We could do something similar for internal .par files if we wanted to migrate from the internal resources.py API to a pkg_resources/setuptools API.

duggelz commented 6 years ago

Once I have the functionality in a good place, I'll make a separate PR to make this easier for users. E.g. something like

par_binary(
    ...
    extract_at_startup_and_add_to_import_path = ['wheel']
    ...
)

But I'll have to think about the various use cases of data files, importable python, shared libraries for C extension modules, etc.