HomeFreeBSD

lang/python: add bytecode trigger

Description

lang/python: add bytecode trigger

Facilitates compiling, writing and removing bytecode files (.pyc)
in site-packages after all pkg transactions have been completed.

Technical details: https://wiki.freebsd.org/Python/CompiledPackages

Fixes reports of Python port builds as root failing on filesystem
violations due to bytecode file writes where the port did not include
them in the package.

For those ports/packages that currently package bytecode, some
checksum mismatches on those files may occur. This is harmless and
will be rectified, in large as part of a USE_PYTHON=distutils
overhaul to reduce churn.

While here, implement a long-standing todo item of letting lang/python
ports use python.mk bits. Not only does this obviate duplicate
variables in each Makefile, but SUB_LIST (also added) is used for
these triggers.

Co-authored by: tcberner
Approved by: tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D34739

Details