diff --git a/recipes/opentrons/0001-FIX-ignore-missing-aionotify-more-properly.patch b/recipes/opentrons/0001-FIX-ignore-missing-aionotify-more-properly.patch new file mode 100644 index 0000000000000..ec310e7803f26 --- /dev/null +++ b/recipes/opentrons/0001-FIX-ignore-missing-aionotify-more-properly.patch @@ -0,0 +1,67 @@ +From c6f69700d07f0f672eeefafa2713a57e9255bebd Mon Sep 17 00:00:00 2001 +From: Maksim Rakitin +Date: Thu, 22 Jul 2021 23:37:13 -0400 +Subject: [PATCH] FIX: ignore missing aionotify more properly + +--- + api/src/opentrons/hardware_control/controller.py | 2 +- + api/tests/opentrons/conftest.py | 2 +- + api/tests/opentrons/hardware_control/test_instruments.py | 2 +- + api/tests/opentrons/hardware_control/test_modules.py | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/api/src/opentrons/hardware_control/controller.py b/api/src/opentrons/hardware_control/controller.py +index a28bfa623..20b4aa1c6 100644 +--- a/api/src/opentrons/hardware_control/controller.py ++++ b/api/src/opentrons/hardware_control/controller.py +@@ -7,7 +7,7 @@ from typing import (Any, Dict, List, Optional, Tuple, + from typing_extensions import Final + try: + import aionotify # type: ignore +-except OSError: ++except (OSError, ModuleNotFoundError): + aionotify = None # type: ignore + + from opentrons.drivers.smoothie_drivers import driver_3_0 +diff --git a/api/tests/opentrons/conftest.py b/api/tests/opentrons/conftest.py +index fa1e0d2b3..a85c2ac08 100755 +--- a/api/tests/opentrons/conftest.py ++++ b/api/tests/opentrons/conftest.py +@@ -9,7 +9,7 @@ from opentrons.protocols.context.protocol_api.protocol_context import \ + + try: + import aionotify +-except OSError: ++except (OSError, ModuleNotFoundError): + aionotify = None # type: ignore + import asyncio + import os +diff --git a/api/tests/opentrons/hardware_control/test_instruments.py b/api/tests/opentrons/hardware_control/test_instruments.py +index 2e00e9841..cd358c3ed 100644 +--- a/api/tests/opentrons/hardware_control/test_instruments.py ++++ b/api/tests/opentrons/hardware_control/test_instruments.py +@@ -2,7 +2,7 @@ import asyncio + from unittest import mock + try: + import aionotify +-except OSError: ++except (OSError, ModuleNotFoundError): + aionotify = None # type: ignore + import pytest + import typeguard +diff --git a/api/tests/opentrons/hardware_control/test_modules.py b/api/tests/opentrons/hardware_control/test_modules.py +index 406f373ba..6591ef80d 100644 +--- a/api/tests/opentrons/hardware_control/test_modules.py ++++ b/api/tests/opentrons/hardware_control/test_modules.py +@@ -4,7 +4,7 @@ from unittest import mock + import pytest + try: + import aionotify +-except OSError: ++except (OSError, ModuleNotFoundError): + aionotify = None # type: ignore + from opentrons.hardware_control import ExecutionManager + from opentrons.hardware_control.modules import ModuleAtPort +-- +2.30.2 + diff --git a/recipes/opentrons/install-opentrons.bat b/recipes/opentrons/install-opentrons.bat new file mode 100644 index 0000000000000..35ef652f7e1d1 --- /dev/null +++ b/recipes/opentrons/install-opentrons.bat @@ -0,0 +1,11 @@ +set PYTHONPATH=%CD%\scripts +cd api\ +%PYTHON% setup.py bdist_wheel + +dir +dir dist + +for /f "tokens=* USEBACKQ" %%g in (`dir /b dist\*.whl`) do (set "whl=%%g") + +%PYTHON% -m pip install dist\%whl% -vv --no-deps + diff --git a/recipes/opentrons/install-opentrons.sh b/recipes/opentrons/install-opentrons.sh new file mode 100644 index 0000000000000..a9f8679b4b773 --- /dev/null +++ b/recipes/opentrons/install-opentrons.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -vxeuo pipefail + +export PYTHONPATH=$PWD/scripts/ +cd api/ +$PYTHON setup.py bdist_wheel +$PYTHON -m pip install dist/*.whl -vv --no-deps + diff --git a/recipes/opentrons/install-shared-data.bat b/recipes/opentrons/install-shared-data.bat new file mode 100644 index 0000000000000..d959d62fea5a3 --- /dev/null +++ b/recipes/opentrons/install-shared-data.bat @@ -0,0 +1,11 @@ +set PYTHONPATH=%CD%\scripts +cd shared-data\python\ +%PYTHON% setup.py bdist_wheel + +dir +dir dist + +for /f "tokens=* USEBACKQ" %%g in (`dir /b dist\*.whl`) do (set "whl=%%g") + +%PYTHON% -m pip install dist\%whl% -vv --no-deps + diff --git a/recipes/opentrons/install-shared-data.sh b/recipes/opentrons/install-shared-data.sh new file mode 100644 index 0000000000000..85c6bdd3f5e68 --- /dev/null +++ b/recipes/opentrons/install-shared-data.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -vxeuo pipefail + +export PYTHONPATH=$PWD/scripts/ + +cd shared-data/python/ +$PYTHON setup.py bdist_wheel +$PYTHON -m pip install dist/*.whl -vv --no-deps + diff --git a/recipes/opentrons/meta.yaml b/recipes/opentrons/meta.yaml new file mode 100644 index 0000000000000..828699b3cbf45 --- /dev/null +++ b/recipes/opentrons/meta.yaml @@ -0,0 +1,74 @@ +{% set version = "4.4.0" %} + +package: + name: opentrons-suite + version: {{ version }} + +source: + url: https://github.com/Opentrons/opentrons/archive/refs/tags/v{{ version }}.tar.gz + sha256: 6dd85756b1c99050926abf6d518fc8179a367a8a0c53d67d170c87312419cf3f + patches: + - 0001-FIX-ignore-missing-aionotify-more-properly.patch + +build: + number: 0 + +outputs: + - name: opentrons_shared_data + script: install-shared-data.bat # [win] + script: install-shared-data.sh # [not win] + build: + noarch: python + requirements: + host: + - python >=3.7 + - pip + run: + - python >=3.7 + - jsonschema >=3.0.2,<4 + test: + imports: + - opentrons_shared_data + commands: + - pip check + requires: + - pip + + - name: opentrons + script: install-opentrons.bat # [win] + script: install-opentrons.sh # [not win] + build: + entry_points: + - opentrons_simulate = opentrons.simulate:main + - opentrons_execute = opentrons.execute:main + skip: true # [py<37] + requirements: + host: + - python + - pip + run: + - python + - aionotify >=0.2.0 # [linux] + - jsonschema >=3.0.2,<4 + - numpy >=1.15.1 + - pydantic >=1.4 + - pyserial >=3.5 + - typing-extensions >=3.7.4.3 + - {{ pin_subpackage('opentrons_shared_data', max_pin="x.x.x") }} + test: + imports: + - opentrons + +about: + home: https://www.opentrons.com + license: Apache-2.0 + license_file: LICENSE + summary: | + The Opentrons API is a simple framework designed to make writing automated + biology lab protocols easy + dev_url: https://github.com/Opentrons/opentrons + doc_url: https://docs.opentrons.com + +extra: + recipe-maintainers: + - mrakitin