build: sort headers and sources in plugin builds

I'd observe a difference in the debuginfo data for the plugins in rebuilds.
Various /usr/lib64/calibre/calibre/plugins/*.so files would be different, but
the source of the difference was in the link to debuginfo data, which in turn
appears to be caused by differences in sort order in various tables, caused by
the object files being listed in different order. setup/build.py writes out
pyproject.toml, which is turned into *.pro, which is turned into a Makefile.
Sorting the object files by name seems to fix this particular issue. This
makes local rebuilds reproducible for me.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-10-21 13:41:04 +02:00
parent 5a85a0e167
commit f51b20e5d9

View File

@ -696,8 +696,8 @@ qmake-settings = [
] ]
[tool.sip.bindings.{ext.name}] [tool.sip.bindings.{ext.name}]
headers = {ext.headers} headers = {sorted(ext.headers)}
sources = {ext.sources} sources = {sorted(ext.sources)}
exceptions = {needs_exceptions} exceptions = {needs_exceptions}
include-dirs = {ext.inc_dirs} include-dirs = {ext.inc_dirs}
qmake-QT = {ext.qt_modules} qmake-QT = {ext.qt_modules}