From 099dca590be2b8aedc59917e927829ccb07b1f0f Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Wed, 7 Feb 2024 10:08:01 -0500 Subject: [PATCH 1/2] chore: verbose pypi deploys to catch errors --- .github/actions/python/pypi-deploy/action.yaml | 2 +- scripts/python.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/python/pypi-deploy/action.yaml b/.github/actions/python/pypi-deploy/action.yaml index 1ce4ff67a1e..8f1d9407fe5 100644 --- a/.github/actions/python/pypi-deploy/action.yaml +++ b/.github/actions/python/pypi-deploy/action.yaml @@ -28,7 +28,7 @@ runs: fi fi status=0 - QUIET=1 BUILD_NUMBER=${OT_BUILD} make -C ${{ inputs.project }} clean deploy twine_repository_url=${{ inputs.repository_url }} pypi_username=opentrons pypi_password=${{ inputs.password }} || status=$? + CI=1 QUIET=1 BUILD_NUMBER=${OT_BUILD} make -C ${{ inputs.project }} clean deploy twine_repository_url=${{ inputs.repository_url }} pypi_username=opentrons pypi_password=${{ inputs.password }} || status=$? if [[ ${status} != 0 ]] && [[ ${{ inputs.repository_url }} =~ "test.pypi.org" ]]; then echo "upload failures allowed to test pypi" exit 0 diff --git a/scripts/python.mk b/scripts/python.mk index 917f6b8b319..6068c535594 100644 --- a/scripts/python.mk +++ b/scripts/python.mk @@ -69,7 +69,7 @@ endef # parameter 2: repository url # parameter 3: the wheel file to upload define python_upload_package -$(python) -m twine upload --repository-url $(2) $(1) $(3) +$(python) -m twine upload $(and $(CI),--verbose) --repository-url $(2) $(1) $(3) endef # Get an enhanced version dict of the project From c635e26e2f6a7dd4510c5d7189c795c5c52a3e19 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Wed, 7 Feb 2024 10:17:58 -0500 Subject: [PATCH 2/2] let's push an sdist while we're at it --- api/Makefile | 4 ++-- hardware/Makefile | 4 ++-- scripts/python.mk | 3 ++- shared-data/python/Makefile | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/api/Makefile b/api/Makefile index 81d49ea5a83..a10b737ed8d 100755 --- a/api/Makefile +++ b/api/Makefile @@ -199,8 +199,8 @@ emulator: -$(python) -m opentrons.hardware_control.emulation.app .PHONY: deploy -deploy: wheel - $(call python_upload_package,$(twine_auth_args),$(twine_repository_url),$(wheel_file)) +deploy: wheel sdist + $(call python_upload_package,$(twine_auth_args),$(twine_repository_url),$(wheel_file),$(sdist_file)) # User must currently specify host, e.g.: `make term host=169.254.202.176` .PHONY: term diff --git a/hardware/Makefile b/hardware/Makefile index 757beb564f1..45c44d98994 100755 --- a/hardware/Makefile +++ b/hardware/Makefile @@ -144,5 +144,5 @@ emulator: echo "Nothing here yet" .PHONY: deploy -deploy: wheel - $(call python_upload_package,$(twine_auth_args),$(twine_repository_url),$(wheel_file)) +deploy: wheel sdist + $(call python_upload_package,$(twine_auth_args),$(twine_repository_url),$(wheel_file),$(sdist_file)) diff --git a/scripts/python.mk b/scripts/python.mk index 6068c535594..64f37721b45 100644 --- a/scripts/python.mk +++ b/scripts/python.mk @@ -68,8 +68,9 @@ endef # parameter 1: auth arguments for twine # parameter 2: repository url # parameter 3: the wheel file to upload +# parameter 4: the sdist to upload define python_upload_package -$(python) -m twine upload $(and $(CI),--verbose) --repository-url $(2) $(1) $(3) +$(python) -m twine upload $(and $(CI),--verbose) --repository-url $(2) $(1) $(3) $(4) endef # Get an enhanced version dict of the project diff --git a/shared-data/python/Makefile b/shared-data/python/Makefile index 439d5901574..c1ffe9bd239 100644 --- a/shared-data/python/Makefile +++ b/shared-data/python/Makefile @@ -118,8 +118,8 @@ push-ot3: push-no-restart-ot3 $(call restart-server,$(host),$(ssh_key),$(ssh_opts),opentrons-robot-server) .PHONY: deploy -deploy: wheel - $(call python_upload_package,$(twine_auth_args),$(twine_repository_url),$(wheel_file)) +deploy: wheel sdist + $(call python_upload_package,$(twine_auth_args),$(twine_repository_url),$(wheel_file),$(sdist_file)) .PHONY: test test: