https://man.openbsd.org/package.5
https://man.openbsd.org/pkg_create.1
http://www.openbsd.org/papers/opencon07-portstutorial/index.html
https://man.openbsd.org/update-plist.1
pkg_create can maybe solve the whole thing about creating a package.
You want to do everything as a port and the run 'make package'.
Explaination of variables in the ports: /usr/ports/lang/python/
make -V <variable-name>