$ cat python3-onionbalance/Makefile
#
# Copyright (C) 2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=python3-onionbalance
PKG_VERSION:=0.2.1
PKG_RELEASE:=1
PYPI_NAME:=OnionBalance
PKG_HASH:=3421e5fdef24674432021c605164c790ff7f66ec2c111f3e610b212c058b33ea
PKG_MAINTAINER:=Donncha O'Cearbhaill <donncha@donncha.is>
PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=LICENSE
include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
define Package/python3-onionbalance
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=onionbalance
URL:=https://onionbalance.readthedocs.io
DEPENDS:=+python3 +python3-setuptools +python3-stem +python3-yaml +python3-cryptography +python3-cryptodomex +python3-future +python3-setproctitle +tor
endef
define Package/python3-onionbalance/description
OnionBalance provides load-balancing and redundancy for Tor onion services by distributing requests to multiple back-end Tor instances.
endef
$(eval $(call Py3Package,python3-onionbalance))
$(eval $(call BuildPackage,python3-onionbalance))
$(eval $(call BuildPackage,python3-onionbalance-src))
It builds and installed successfully with dependencies.
I just can't add the /etc/onionbalance directory to the package.
The Py3Package/<package>/filespec rule contains one or more lines of the following format (whitespace added for clarity):
<one of: +-=> | <file/directory path> | <file permissions>
Never tested myself but I have a lot of trouble building python-pip packages myself...
or you may include in your makefile the default python3 package install and customize it :