Skip to content

Commit b462b20

Browse files
authored
Merge pull request #20297 from mrclary/issue-20291
PR: Fix installer issues and bug when getting environment variables
2 parents 9670d5b + da60eb9 commit b462b20

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

.github/workflows/installer-macos.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ jobs:
6666
with:
6767
python-version: '3.9.14'
6868
architecture: 'x64'
69+
- name: Install pcregrep
70+
run: |
71+
if [[ -z "$(which pcregrep)" ]]; then
72+
brew install pcre
73+
else
74+
echo "$(which pcregrep) already installed."
75+
fi
6976
- name: Install Dependencies
7077
run: |
7178
INSTALL_FLAGS=()
@@ -94,7 +101,7 @@ jobs:
94101
- name: Code Sign Application
95102
if: ${{github.event_name == 'release'}}
96103
run: |
97-
pil=$(${pythonLocation} -c "import PIL, os; print(os.path.dirname(PIL.__file__))")
104+
pil=$(${pythonLocation}/bin/python -c "import PIL, os; print(os.path.dirname(PIL.__file__))")
98105
rm -v ${DISTDIR}/Spyder.app/Contents/Frameworks/liblzma.5.dylib
99106
cp -v ${pil}/.dylibs/liblzma.5.dylib ${DISTDIR}/Spyder.app/Contents/Frameworks/
100107
./codesign.sh "${DISTDIR}/Spyder.app"

.github/workflows/installers-conda.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
needs:
9898
- build-matrix
9999
- build-noarch-pkgs
100-
if: contains(fromJson('["success", "skipped"]'), needs.build-noarch-pkgs.result) && needs.build-matrix.result == 'success'
100+
if: ${{ ! failure() && ! cancelled() }}
101101
strategy:
102102
matrix:
103103
target-platform: ${{fromJson(needs.build-matrix.outputs.target_platform)}}
@@ -115,12 +115,23 @@ jobs:
115115
APPLICATION_PWD: ${{ secrets.APPLICATION_PWD }}
116116
CONSTRUCTOR_TARGET_PLATFORM: ${{ matrix.target-platform }}
117117
STATUS: ${{ needs.build-noarch-pkgs.result }}
118+
MAT_STATUS: ${{ needs.build-matrix.result }}
119+
118120
steps:
119121
- name: Checkout Code
120122
uses: actions/checkout@v3
121123
with:
122124
fetch-depth: 0
123125

126+
- name: Install pcregrep
127+
if: runner.os == 'macOS'
128+
run: |
129+
if [[ -z "$(which pcregrep)" ]]; then
130+
brew install pcre
131+
else
132+
echo "$(which pcregrep) already installed."
133+
fi
134+
124135
- name: Setup Build Environment
125136
uses: mamba-org/provision-with-micromamba@main
126137
with:

spyder/utils/environ.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ def get_user_environment_variables():
6060
res = stdout.decode().strip().split(os.linesep)
6161
env_var = {}
6262
for kv in res:
63-
k, v = kv.split('=', 1)
64-
env_var[k] = v
63+
try:
64+
k, v = kv.split('=', 1)
65+
env_var[k] = v
66+
except Exception:
67+
pass
6568

6669
return env_var
6770

0 commit comments

Comments
 (0)