Upgrade advice needed from 18.06 to 19.07

I am working on an already existing build for my company. We have a local snapshot of OpenWRT 18.06.04 and a proprietary feed of our own, which makes use of some standard Makefiles and patches. This has been working well for some time.
Our application is written mostly in Python, and the feed's main Makefile takes care of the installation of python packages.
When considering upgrading from 18.06 to 19.7, I saw that some of the elements which the old version of the Makefile attempts to install are no longer needed, because they are offered as part of the more recent Python ecosystem. In fact, in order to prevent some configuration errors, I had to remove them.
Once the build proceeds past those errors, the 19.07 build system behaves differently to the 18.06, though, and I am having trouble finding out what's going wrong.
I'd be very grateful for any help.
The Makefile consist of the following:

include $(TOPDIR)/rules.mk
PKG_RELEASE := 1

PKG_NAME		  := hanip
PKG_VERSION_MAJOR := 2.1
PKG_VERSION		  := $(PKG_VERSION_MAJOR).1
PKG_HASH		  := ad10a3197bb7a982bd8847014d99c029f1d34959064861fc1e5306d9a1ed1508

PKG_APP_NAME	  := onionApp

PKG_SOURCE		  := $(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL	  := http://dev1/source_releases/ITxPT/$(PKG_NAME)/$(PKG_VERSION_MAJOR)/

PKG_BUILD_DEPENDS := python3

include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk

define Package/onion-hanip
  TITLE	  := Onion (ITxPT and ISI)
  DEPENDS := +python3-light \
		 +python3-paho-mqtt \
		 +python3-dicttoxml \
		 +python3-bottle \
		 +python3-zeroconf
  VARIANT := python3
endef


define Py3Package/onion-hanip/install
	$(INSTALL_DIR) $$(1)/etc/init.d
	$(INSTALL_DIR) $$(1)/usr/bin
# !!! It is at the following line the error is occurring, because at this point the 19.7 version
# !!! tells me that the directory does not exist, so permissions cannot be changed.
# !!! However, the 18.06 does not complain, and does exactly what is required.
# !!! Can anyone explain how the build process differs, and what I must do to correct this?
	$(INSTALL_DIR) $$(1)/usr/share/renderbox
	$(INSTALL_DIR) $$(1)/usr/share/payload
	$(INSTALL_DIR) $$(1)/etc/$(PKG_NAME)

	# python-package-install.sh removes all empty directories in /usr but
	# we need /usr/share/payload
	touch $$(1)/usr/share/payload/.keep

	$(CP) $(PKG_INSTALL_DIR)/usr/share/renderbox/* $$(1)/usr/share/renderbox/
	$(CP) $(PKG_INSTALL_DIR)/etc/hanip/*.cfg $$(1)/etc/$(PKG_NAME)/

	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/
	find $$(1)/ -name __pycache__ | xargs rm -rf
	$(call Build/Compile/HostPy3RunTarget,,\
		-m compileall -d $$(1)/usr/bin/ $(PKG_INSTALL_DIR)/usr/bin/ \
	)
	$(INSTALL_BIN) ./files/$(PKG_NAME).init $$(1)/etc/init.d/$(PKG_NAME)
	$(INSTALL_BIN) ./files/$(PKG_APP_NAME).sh $$(1)/usr/bin/$(PKG_APP_NAME)
endef

$(eval $(call Py3Package,onion-hanip))
$(eval $(call BuildPackage,onion-hanip))