[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#998059: sphinx: LANGUAGE environment variable inconsistently affects output of objects.inv



Source: sphinx
Followup-For: Bug #998059
X-Debbugs-Cc: debian-python@lists.debian.org

(context: cross-posting based on an idea[1] that has been discussed upstream in sphinx's GitHub repository about how to resolve locale-based build variance)

The SPHINXOPTS[2] environment variable provides a way to selectively override defined environment variables (such as LANGUAGE) in a way that should only affect sphinx (limiting the effects on unrelated build steps).

For example:

  SPHINXOPTS='-D LANGUAGE="en_US.UTF-8"'

That would allow the objects.inv file to be built in a fixed language on a per-package basis.

It doesn't seem ideal to artificially limit documentation localization for affected packages, but could allow many of the affected packages to pass diffoscope reproducibility testing.

Alternatives explored: I wasn't able to identify a straightforward, supported way to disable creation of the objects.inv file, nor is it currently possible to invoke a multi-locale HTML sphinx build (an approach that might permit output of monolithic documentation outputs that wouldn't vary based on build environment locale).  I'll file a feature request for the former; the latter is tracked by an existing request[3].

[1] - https://github.com/sphinx-doc/sphinx/issues/9778#issuecomment-1264065231

[2] - https://github.com/sphinx-doc/sphinx/blob/v4.5.0/doc/man/sphinx-build.rst#environment-variables

[3] - https://github.com/sphinx-doc/sphinx/issues/788


Reply to: