Skip to content

Commit 9ac4819

Browse files
committed
TST: Rebase NumPy dlls before running test in Cygwin CI.
Also fix some bashisms in a couple of scripts.
1 parent 4205ee7 commit 9ac4819

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.github/workflows/cygwin.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
- name: Install new NumPy
5050
run: |
5151
bash -c "/usr/bin/python3.8 -m pip install dist/numpy-*cp38*.whl"
52+
- name: Rebase NumPy compiled extensions
53+
run: |
54+
bash -c "/usr/bin/rebase --database --oblivious `/bin/dash tools/list_numpy_dlls.sh 3.8`"
5255
- name: Run NumPy test suite
5356
run: >-
5457
dash -c "/usr/bin/python3.8 runtests.py -n -vv"

tools/list_installed_dll_dependencies_cygwin.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# /bin/sh
1313

1414
py_ver=${1}
15-
site_packages=$(python${py_ver} -m pip show numpy | \
16-
grep Location | cut -d " " -f 2 -);
17-
dll_list=$(for name in $(python${py_ver} -m pip show -f numpy | \
18-
grep -F .dll); do echo ${site_packages}/${name}; done)
15+
dll_list=`/bin/dash tools/list_numpy_dlls.sh ${py_ver}`
1916
echo "Checks for existence, permissions and file type"
2017
ls -l ${dll_list}
2118
file ${dll_list}
@@ -29,10 +26,10 @@ cd dist/
2926
for name in ${dll_list};
3027
do
3128
echo ${name}
32-
ext_module=$(echo ${name} | \
29+
ext_module=`echo ${name} | \
3330
sed -E \
3431
-e "s/^\/+(home|usr).*?site-packages\/+//" \
3532
-e "s/.cpython-3.m?-x86(_64)?-cygwin.dll$//" \
36-
-e "s/\//./g")
33+
-e "s/\//./g"`
3734
python${py_ver} -c "import ${ext_module}"
3835
done

tools/list_numpy_dlls.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/dash
2+
# Print the list of dlls installed by NumPy
3+
4+
py_ver=${1}
5+
site_packages=`python${py_ver} -m pip show numpy | \
6+
grep Location | cut -d " " -f 2 -`;
7+
dll_list=`for name in $(python${py_ver} -m pip show -f numpy | \
8+
grep -F .dll); do echo ${site_packages}/${name}; done`
9+
echo ${dll_list}

0 commit comments

Comments
 (0)