python3: avoid unnecessary rebuilds 22306/head
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Wed, 4 Oct 2023 19:19:07 +0000 (16:19 -0300)
committerEneas U de Queiroz <cotequeiroz@gmail.com>
Wed, 4 Oct 2023 19:52:27 +0000 (16:52 -0300)
Move the order in which BuildPackage is called, so that the libpython
package is built ahead of the module packages, to avoid forcing a
clean-build of the package when 'make package/python3/compile' is called
a second time without changes.

The library must be built first, so that when the buildsystem checks for
ABI version changes using libpython3.version, its timestamp should be
older than the dependent package's STAMP_PREPARED file.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
lang/python/python3/Makefile

index a54d0270400a688d2d0ba8bf0e298c3474649cee..14915715bca77d64bc203104e22fb129abb45f53 100644 (file)
@@ -358,12 +358,6 @@ endef
 
 $(eval $(call HostBuild))
 
-$(foreach package, $(PYTHON3_PACKAGES),  \
-       $(eval $(call Py3Package,$(package))) \
-       $(eval $(call BuildPackage,$(package))) \
-       $(eval $(call BuildPackage,$(package)-src)) \
-)
-
 $(eval $(call BuildPackage,libpython3))
 $(eval $(call BuildPackage,python3))
 
@@ -375,3 +369,9 @@ $(eval $(call BuildPackage,python3-light))
 
 $(eval $(call BuildPackage,python3-base-src))
 $(eval $(call BuildPackage,python3-light-src))
+
+$(foreach package, $(PYTHON3_PACKAGES),  \
+       $(eval $(call Py3Package,$(package))) \
+       $(eval $(call BuildPackage,$(package))) \
+       $(eval $(call BuildPackage,$(package)-src)) \
+)