diff --git a/Config.in b/Config.in index 182fa0643b6..d477c20edab 100644 --- a/Config.in +++ b/Config.in @@ -5,4 +5,5 @@ source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/robot-server/Config.in" source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/shared-data/python/Config.in" source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/notify-server/Config.in" source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/system-server/Config.in" -source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/server-utils/Config.in" \ No newline at end of file +source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/server-utils/Config.in" +source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/hardware/Config.in" \ No newline at end of file diff --git a/external.mk b/external.mk index bf1abe6b3a4..1faab2133d6 100644 --- a/external.mk +++ b/external.mk @@ -6,3 +6,4 @@ include $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/shared-data/python/buildroot.mk include $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/notify-server/buildroot.mk include $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/system-server/buildroot.mk include $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/server-utils/buildroot.mk +include $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/hardware/buildroot.mk diff --git a/hardware/Config.in b/hardware/Config.in new file mode 100644 index 00000000000..ea627085ea4 --- /dev/null +++ b/hardware/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_PYTHON_OPENTRONS_HARDWARE + bool "python-opentrons-system-server" + depends on BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_AIONOTIFY # runtime + select BR2_PACKAGE_PYTHON_ANYIO # runtime + select BR2_PACKAGE_PYTHON_JSONSCHEMA # runtime + select BR2_PACKAGE_PYTHON_NUMPY # runtime + select BR2_PACKAGE_PYTHON_PYDANTIC # runtime + select BR2_PACKAGE_PYTHON_SERIAL # runtime + select BR2_PACKAGE_PYTHON_SYSTEMD # runtime + select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS # runtime + select BR2_PACKAGE_PYTHON_CLICK # runtime + + help + Opentrons system HTTP server. Provides access to an OT-2 robot. + + https://opentrons.com \ No newline at end of file diff --git a/hardware/buildroot.mk b/hardware/buildroot.mk new file mode 100644 index 00000000000..de854b9c0a4 --- /dev/null +++ b/hardware/buildroot.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# python-opentrons-hardware +# +################################################################################ + +define OTHARDWARE_CALL_PBU + $(shell python $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/scripts/python_build_utils.py hardware $(or $(OPENTRONS_PROJECT),robot-stack) $(1)) +endef + +PYTHON_OPENTRONS_HARDWARE_VERSION = $(call OTHARDWARE_CALL_PBU,get_version) +PYTHON_OPENTRONS_HARDWARE_LICENSE = Apache-2 +PYTHON_OPENTRONS_HARDWARE_LICENSE_FILES = $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/LICENSE +PYTHON_OPENTRONS_HARDWARE_SETUP_TYPE = setuptools +PYTHON_OPENTRONS_HARDWARE_SITE_METHOD = local +PYTHON_OPENTRONS_HARDWARE_SITE = $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH) +PYTHON_OPENTRONS_HARDWARE_SUBDIR = hardware +PYTHON_OPENTRONS_HARDWARE_POST_INSTALL_TARGET_HOOKS = PYTHON_OPENTRONS_HARDWARE_INSTALL_VERSION + +define PYTHON_OPENTRONS_HARDWARE_INSTALL_VERSION + echo '$(call OTHARDWARE_CALL_PBU,dump_br_version)' > $(BINARIES_DIR)/opentrons-hardware-version.json +endef + +ot_hardware_name := python-opentrons-hardware + +export OPENTRONS_GIT_DIR=$(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH) + +# Calling inner-python-package directly instead of using python-package macro +# because our directory layout doesn’t conform to buildroot’s expectation of +# having the directory name be the package name +$(eval $(call inner-python-package,$(ot_hardware_name),$(call UPPERCASE,$(ot_hardware_name)),$(call UPPERCASE,$(ot_hardware_name)),target)) +