Skip to content

Commit a77ffd7

Browse files
committed
RQA-2830 fix mac dmg to be x64 binary and use x64 bundled python to pip install (#15624)
## Replaces #15618 with PR against branch name ending in `app-build-internal` to trigger a build ## Overview - <https://opentrons.atlassian.net/browse/RQA-2830> - `macos-11` GitHub runner was intel and now we use macos-latest that is arm [doc](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories) - specify --x64 argument to electron-builder - ~~per [doc](https://github.com/actions/setup-python?tab=readme-ov-file#supported-architectures) x64 python should be installed so the pip install will be the right platform. I'm not confident in this.~~ - see comment in #15618 - we need to use the python we download on mac to do the pip install so the installed packages match the platform correctly ## Test Plan - [x] build locally and see that it works - [x] watch CI and install the built package - [x] validate that once the package dmg is x64 that analysis works (python has packages with the right arch) # Review requests - This the right approach? # Risk assessment High because our .dmg currently cannot analyze protocols 2.0.0-alpha.0 internal release build.
1 parent 043bca7 commit a77ffd7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

app-shell/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ dist-posix: package-deps
122122

123123
.PHONY: dist-osx
124124
dist-osx: package-deps
125-
$(builder) --mac
125+
$(builder) --mac --x64
126126
$(MAKE) _dist-collect-artifacts
127127

128128
.PHONY: dist-linux

app-shell/scripts/before-pack.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,16 @@ module.exports = function beforeBuild(context) {
118118

119119
// TODO(mc, 2022-05-16): explore virtualenvs for a more reliable
120120
// implementation of this install
121-
return execa(HOST_PYTHON, [
121+
console.log(
122+
`Installing python native deps using ${path.join(
123+
PYTHON_DESTINATION,
124+
'python3.10'
125+
)}`
126+
)
127+
const invokablePython = platformName.includes('darwin')
128+
? path.join(PYTHON_DESTINATION, 'python/bin/python3.10')
129+
: HOST_PYTHON
130+
return execa(invokablePython, [
122131
'-m',
123132
'pip',
124133
'install',

0 commit comments

Comments
 (0)