Make saxonche an optional dependency#153
Open
mprpic wants to merge 1 commit into
Open
Conversation
cb2903e to
84c81ef
Compare
saxonche (Saxon/C XSLT processor bindings) is only needed for Schematron validation but is declared as a hard dependency, which means it is always installed. This is problematic becaus saxonche does not have a source distribution on PyPI, does not publish wheels for ppc64le or s390x architectures, and uses a non-standard git forge (https://saxonica.plan.io/projects/saxonmirrorhe/repository); the mirror at https://github.com/Saxonica/Saxon-HE does not publish any build infrastructure. All of this means makes doclang uninstallable on the aforementioned architectures or systems that require building dependencies from source. This changes moves saxonche from core dependencies to an optional extra (pip install doclang[schematron]) and lazy-load it in the two functions that use it. All other doclang functionality (packaging, XSD validation, serialization, deserialization) works without saxonche installed. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Martin Prpič <mprpic@redhat.com>
84c81ef to
74253f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
saxonche (Saxon/C XSLT processor bindings) is only needed for Schematron validation but is declared as a hard dependency, which means it is always installed.
This is problematic becaus saxonche does not have a source distribution on PyPI, does not publish wheels for ppc64le or s390x architectures, and uses a non-standard git forge
(https://saxonica.plan.io/projects/saxonmirrorhe/repository); the mirror at https://github.com/Saxonica/Saxon-HE does not publish any build infrastructure. All of this means makes doclang uninstallable on the aforementioned architectures or systems that require building dependencies from source.
This changes moves saxonche from core dependencies to an optional extra (
pip install doclang[schematron]) and lazy-load it in the two functions that use it. All other doclang functionality (packaging, XSD validation, serialization, deserialization) works without saxonche installed.