[Buildroot] [git commit] package/pkg-python: invalidate precompiled _sysconfigdata*.pyc

James Hilliard james.hilliard1 at gmail.com
Thu Jul 8 10:16:18 UTC 2021


This seems to break host-python3-setuptools, see:
http://autobuild.buildroot.net/results/860a188bd270c59b1fee2f56f31e73689f0e4979/build-end.log

Reverting this change fixes that error.

On Tue, Jul 6, 2021 at 3:13 PM Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
>
> commit: https://git.buildroot.net/buildroot/commit/?id=836528f03eb89fdc64432f7a7470145ddf553b8c
> branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
>
> For per-package directories, we fixup the _sysconfigdata*.py files, so
> that they get proper path pointing to the current package's direcotry
> structure.
>
> However, the corresponding, pre-compiled blobs _sysconfigdata*.pyc were
> left around, and thus are inconsistent with their source. They might
> also be regenerated when a package would install a python module; this
> regeneration would trigger the soon-to-be-introduced overwrite
> detection.
>
> This commit simply removes _sysconfigdata*.pyc files; they will anyway
> be regenerated by the PYTHON{,3}_CREATE_PYC_FILES target finalize hooks.
> This is an efficient way to guarantee the consistency between the source
> and precompiled versions, and to not trigger the overwrite detection.
>
> Signed-off-by: Herve Codina <herve.codina at bootlin.com>
> [yann.morin.1998 at free.frs: reword the commit log]
> Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
> ---
>  package/pkg-python.mk | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> index 59a48e5a87..1e4fd5ba33 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -97,6 +97,8 @@ define PKG_PYTHON_FIXUP_SYSCONFIGDATA
>         find $(HOST_DIR)/lib/python* $(STAGING_DIR)/usr/lib/python* \
>                 -name "_sysconfigdata*.py" | xargs --no-run-if-empty \
>                 $(SED) "s:$(PER_PACKAGE_DIR)/[^/]\+/:$(PER_PACKAGE_DIR)/$($(PKG)_NAME)/:g"
> +       find $(HOST_DIR)/lib/python* $(STAGING_DIR)/usr/lib/python* \
> +               -name "_sysconfigdata*.pyc" -delete
>  endef
>  endif
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



More information about the buildroot mailing list