Skip to content

Commit

Permalink
add opentrons_hardware to buildroot config files
Browse files Browse the repository at this point in the history
  • Loading branch information
fsinapi committed Oct 11, 2023
1 parent 59932d8 commit a6a65db
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"
source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/server-utils/Config.in"
source "$BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH/hardware/Config.in"
1 change: 1 addition & 0 deletions external.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions hardware/Config.in
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions hardware/buildroot.mk
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit a6a65db

Please sign in to comment.