indygreg / indygreg/PyOxidizer
Is it possible to get fine-grained control over which stdlib extensions are included?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
I was trying to figure out how to include specific stdlib extension modules (e.g. _ssl) but not others (e.g. _asyncio). I found:
PythonPackagingPolicy.extension_module_filter: this lets you set a few general policies likeallorminimal, but doesn't give control on a per-resource level AFAICTPythonPackagingPolicy.register_resource_callback: this gives you a ton of flexibility to configure most resources... but for stdlib extension modules, thePythonExtensionModuleit receives seems to haveadd_include=Falseregardless of the setting of theextension_module_filter.
I think the most intuitive way would be for extension_module_filter to apply first and set the default values for add_include on all the stdlib modules, and then the resource callback would run second and have a chance to override that on a per-module basis. But apparently something else is going on?
Not sure if this is a documentation request or a feature request :-)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing PythonPackagingPolicy.extension_module_filter, register_resource_callback, and the PythonExtensionModule resource handling. Verify how extension_module_filter and callback decisions currently interact for stdlib modules such as _ssl and _asyncio. Done means a user can select individual stdlib extensions and override those selections per module through the documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100