aws-samples / aws-samples/amazon-textract-textractor
Feature Request: Make Pillow an Optional Dependency
- Dominant language
- Jupyter Notebook
- Stars
- 493
- Forks
- 163
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Enterprise customers with strict open-source license policies cannot use amazon-textract-textractor because Pillow is a mandatory dependency. Pillow's compiled wheels bundle GPL-licensed code, which is blocked by corporate artifact repositories.
Problem
Many enterprise environments use artifact repository managers (JFrog Artifactory, Nexus) with license curation policies that block GPL-licensed packages. Pillow's PyPI wheels include:
liblzma — build scripts licensed under GPLv2+
FreeType — dual-licensed (FTL or GPLv2)
Reference: https://github.com/python-pillow/Pillow/tree/main/wheels/dependency_licenses
When these repositories scan Pillow, they detect GPL-licensed files and block installation. Since amazon-textract-textractor declares Pillow as a mandatory dependency, the entire package becomes unusable.
Use Case
We use amazon-textract-textractor only for JSON parsing of Textract API responses using the response_parser module. We do not use any Pillow-dependent features:
No image visualization
No PDF rasterization
No local file input
The response_parser module itself does not import Pillow. However, the package initialization unconditionally imports modules that require Pillow — causing import failures even when Pillow features are not needed.
Contributor guide
Assessment
This issue has not been assessed yet.