Consider creating pypi-variables like cpan-variables.
apkbuild-pypi creates the pydepends and pymakedepend variables when creating/changing an APKBUILD. There is currently cpan-variable [AL35] that deals with apkbuild-cpan and its creation of cpandepends, cpanmakedepends and cpancheckdepends.