def METHOD_NAME(self) -> List[str]:
    # $SNAPCRAFT_PYTHON_INTERPRETER (as -m venv will create the link to the
    # interpreter invoked).
    build_commands = [
        '"${SNAPCRAFT_PYTHON_INTERPRETER}" -m venv ${SNAPCRAFT_PYTHON_VENV_ARGS} "${SNAPCRAFT_PART_INSTALL}"',
        'SNAPCRAFT_PYTHON_VENV_INTERP_PATH="${SNAPCRAFT_PART_INSTALL}/bin/${SNAPCRAFT_PYTHON_INTERPRETER}"',
    ]
    if self.options.constraints:
        constraints = " ".join(f"-c {c!r}" for c in self.options.constraints)
    else:
        constraints = ""
    if self.options.python_packages:
        python_packages = " ".join(
            [shlex.quote(pkg) for pkg in self.options.python_packages]
        )
        python_packages_cmd = f"pip install {constraints} -U {python_packages}"
        build_commands.append(python_packages_cmd)
    if self.options.requirements:
        requirements = " ".join(f"-r {r!r}" for r in self.options.requirements)
        requirements_cmd = f"pip install {constraints} -U {requirements}"
        build_commands.append(requirements_cmd)
    build_commands.append(f"[ -f setup.py ] && pip install {constraints} -U .")
    # Now fix shebangs.
    # TODO: replace with snapcraftctl once the two scripts are consolidated
    # and use mangling.rewrite_python_shebangs.
    build_commands.append(
        dedent(
            """\
        find "${SNAPCRAFT_PART_INSTALL}" -type f -executable -print0 | xargs -0 \
            sed -i "1 s|^#\\!${SNAPCRAFT_PYTHON_VENV_INTERP_PATH}.*$|#\\!/usr/bin/env ${SNAPCRAFT_PYTHON_INTERPRETER}|"
        """
        )
    )
    # Lastly, fix the symlink to the "real" python3 interpreter.
    # TODO: replace with snapcraftctl (create_relative_symlinks).
    build_commands.append(
        dedent(
            """\
        determine_link_target() {
            opts_state="$(set +o +x | grep xtrace)"
            interp_dir="$(dirname "${SNAPCRAFT_PYTHON_VENV_INTERP_PATH}")"
            # Determine python based on PATH, then resolve it, e.g:
            # (1) /home/ubuntu/.venv/snapcraft/bin/python3 -> /usr/bin/python3.8
            # (2) /usr/bin/python3 -> /usr/bin/python3.8
            # (3) /root/stage/python3 -> /root/stage/python3.8
            # (4) /root/parts/<part>/install/usr/bin/python3 -> /root/parts/<part>/install/usr/bin/python3.8
            python_path="$(which "${SNAPCRAFT_PYTHON_INTERPRETER}")"
            python_path="$(readlink -e "${python_path}")"
            for dir in "${SNAPCRAFT_PART_INSTALL}" "${SNAPCRAFT_STAGE}"; do
                if  echo "${python_path}" | grep -q "${dir}"; then
                    python_path="$(realpath --strip --relative-to="${interp_dir}" \\
                            "${python_path}")"
                    break
                fi
            done
            echo "${python_path}"
            eval "${opts_state}"
        }
        python_path="$(determine_link_target)"
        ln -sf "${python_path}" "${SNAPCRAFT_PYTHON_VENV_INTERP_PATH}"
        """
        )
    )
    return build_commands