Skip to content

Make saxonche an optional dependency#153

Open
mprpic wants to merge 1 commit into
doclang-project:mainfrom
mprpic:make-saxonche-optional
Open

Make saxonche an optional dependency#153
mprpic wants to merge 1 commit into
doclang-project:mainfrom
mprpic:make-saxonche-optional

Conversation

@mprpic

@mprpic mprpic commented Jun 29, 2026

Copy link
Copy Markdown

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.

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>
@mprpic mprpic force-pushed the make-saxonche-optional branch from 84c81ef to 74253f4 Compare July 1, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant