Skip to content

Commit 3744592

Browse files
committed
Copy signing changes over
1 parent 3c52bda commit 3744592

4 files changed

Lines changed: 54 additions & 11 deletions

File tree

build_electron_app.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ pyinstaller ^
8181
--collect-all=starlette ^
8282
--collect-all=pydantic ^
8383
--collect-all=websockets ^
84+
--collect-all=pandas ^
85+
--collect-all=numpy ^
86+
--collect-all=pandarallel ^
87+
--collect-all=inflection ^
88+
--collect-all=networkx ^
89+
--collect-all=dataclasses_json ^
90+
--collect-all=rdflib ^
8491
--paths "..\.." ^
8592
--paths "..\..\synapseclient" ^
8693
--console ^

build_electron_app.sh

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ build_python_backend() {
8282
--collect-all=starlette \
8383
--collect-all=pydantic \
8484
--collect-all=websockets \
85+
--collect-all=pandas \
86+
--collect-all=numpy \
87+
--collect-all=pandarallel \
88+
--collect-all=inflection \
89+
--collect-all=networkx \
90+
--collect-all=dataclasses_json \
91+
--collect-all=rdflib \
8592
--paths "../.." \
8693
--paths "../../synapseclient" \
8794
--console \
@@ -98,8 +105,18 @@ build_python_backend() {
98105

99106
# Check if we're in a CI environment with signing credentials
100107
if [ -n "$APPLE_TEAM_ID" ]; then
108+
# Determine the signing identity to use
109+
# If SIGNING_IDENTITY is set (from CI), use it; otherwise use generic string
110+
if [ -n "$SIGNING_IDENTITY" ]; then
111+
SIGN_ID="$SIGNING_IDENTITY"
112+
echo "Using signing identity from environment: $SIGN_ID"
113+
else
114+
SIGN_ID="Developer ID Application"
115+
echo "Using default signing identity: $SIGN_ID"
116+
fi
117+
101118
# Sign with hardened runtime and backend-specific entitlements
102-
codesign --sign "Developer ID Application" \
119+
codesign --sign "$SIGN_ID" \
103120
--force \
104121
--options runtime \
105122
--entitlements ../build/entitlements.backend.plist \
@@ -110,8 +127,11 @@ build_python_backend() {
110127
codesign --verify --verbose dist/synapse-backend
111128
if [ $? -eq 0 ]; then
112129
echo "Python backend successfully signed"
130+
# Display signature details
131+
codesign -dv dist/synapse-backend
113132
else
114133
echo "WARNING: Python backend signature verification failed"
134+
exit 1
115135
fi
116136
else
117137
echo "Skipping code signing (not in CI environment or credentials not available)"
@@ -139,6 +159,17 @@ build_electron_app() {
139159
npm run build -- --linux
140160
;;
141161
"macos")
162+
# Ensure Apple notarization env vars are available to electron-builder
163+
echo "Checking notarization environment variables..."
164+
[ -n "$APPLE_ID" ] && echo "✓ APPLE_ID is set" || echo "✗ APPLE_ID is NOT set"
165+
[ -n "$APPLE_APP_SPECIFIC_PASSWORD" ] && echo "✓ APPLE_APP_SPECIFIC_PASSWORD is set" || echo "✗ APPLE_APP_SPECIFIC_PASSWORD is NOT set"
166+
[ -n "$APPLE_TEAM_ID" ] && echo "✓ APPLE_TEAM_ID is set" || echo "✗ APPLE_TEAM_ID is NOT set"
167+
168+
# Export environment variables so they're available to npm and electron-builder
169+
export APPLE_ID
170+
export APPLE_APP_SPECIFIC_PASSWORD
171+
export APPLE_TEAM_ID
172+
142173
npm run build -- --mac
143174
;;
144175
"windows")

setup.cfg

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[metadata]
32
name = synapseclient
43
description = A client for Synapse, a collaborative, open-source research platform that allows teams to share data, track analyses, and collaborate.
@@ -63,12 +62,12 @@ install_requires =
6362
httpcore>=1.0.9
6463
tqdm>=4.66.2,<5.0
6564
async-lru~=2.0.4
66-
psutil~=5.9.8
65+
psutil>=5.9.8
6766
tests_require =
6867
pytest~=8.2.0
6968
pytest-mock>=3.0,<4.0
7069
pytest-socket~=0.6.0
71-
pytest-asyncio>=0.25.0,<1.0
70+
pytest-asyncio>=1.2.0,<2.0
7271
flake8>=3.7.0,<4.0
7372
pytest-xdist[psutil]>=2.2,<3.0.0
7473
pytest-rerunfailures~=12.0
@@ -81,7 +80,7 @@ dev =
8180
pytest~=8.2.0
8281
pytest-mock>=3.0,<4.0
8382
pytest-socket~=0.6.0
84-
pytest-asyncio>=0.25.0,<1.0
83+
pytest-asyncio>=1.2.0,<2.0
8584
flake8>=3.7.0,<4.0
8685
pytest-xdist[psutil]>=2.2,<3.0.0
8786
pytest-rerunfailures~=12.0
@@ -95,7 +94,7 @@ tests =
9594
pytest~=8.2.0
9695
pytest-mock>=3.0,<4.0
9796
pytest-socket~=0.6.0
98-
pytest-asyncio>=0.25.0,<1.0
97+
pytest-asyncio>=1.2.0,<2.0
9998
flake8>=3.7.0,<4.0
10099
pytest-xdist[psutil]>=2.2,<3.0.0
101100
pytest-rerunfailures~=12.0
@@ -106,6 +105,14 @@ tests =
106105
pandas =
107106
pandas>=1.5,<3.0
108107

108+
curator =
109+
%(pandas)s
110+
pandarallel>=1.6.4
111+
inflection>=0.5.1
112+
networkx>=2.2.8
113+
dataclasses-json>=0.6.1
114+
rdflib>=6.0.0
115+
109116
pysftp =
110117
pysftp>=0.2.8,<0.3
111118
paramiko<4.0.0
@@ -132,6 +139,7 @@ electron =
132139
python-multipart>=0.0.6
133140
uvicorn>=0.24.0
134141
websockets>=12.0
142+
%(curator)s
135143

136144
[options.entry_points]
137145
console_scripts =

synapse-electron/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@
6464
"hardenedRuntime": true,
6565
"gatekeeperAssess": false,
6666
"entitlements": "build/entitlements.mac.plist",
67-
"entitlementsInherit": "build/entitlements.mac.plist",
68-
"notarize": {
69-
"teamId": "${APPLE_TEAM_ID}"
70-
}
67+
"entitlementsInherit": "build/entitlements.mac.plist"
7168
},
7269
"linux": {
7370
"target": [
@@ -92,7 +89,7 @@
9289
"cross-env": "^10.0.0",
9390
"dotenv": "^16.0.3",
9491
"electron": "^27.0.0",
95-
"electron-builder": "^24.6.4",
92+
"electron-builder": "^25.1.8",
9693
"@electron/notarize": "^2.1.0"
9794
},
9895
"dependencies": {

0 commit comments

Comments
 (0)