package/pkg-python: invalidate precompiled _sysconfigdata*.pyc
authorHerve Codina <herve.codina@bootlin.com>
Tue, 6 Jul 2021 14:24:50 +0000 (16:24 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 6 Jul 2021 20:53:42 +0000 (22:53 +0200)
commit836528f03eb89fdc64432f7a7470145ddf553b8c
tree518b2a0368b7529ce98d25a9279411b5b34a2c5c
parent6bfe74433aef3fb26f3d08777a78a78e5e6d7f3c
package/pkg-python: invalidate precompiled _sysconfigdata*.pyc

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@bootlin.com>
[yann.morin.1998@free.frs: reword the commit log]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/pkg-python.mk