Skip to content

Commit 9b0b40b

Browse files
authored
Merge pull request numpy#20222 from DWesl/run-rebase-on-cygwin-ci
Run rebase on Cygwin CI
2 parents d5f6618 + eaf95ff commit 9b0b40b

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

.github/workflows/cygwin.yml

Lines changed: 4 additions & 1 deletion
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+
dash "tools/rebase_installed_dlls_cygwin.sh" 3.8
5255
- name: Run NumPy test suite
5356
run: >-
5457
dash -c "/usr/bin/python3.8 runtests.py -n -vv"
@@ -64,4 +67,4 @@ jobs:
6467
dash -c "/usr/bin/python3.8 -m pip show numpy"
6568
dash -c "/usr/bin/python3.8 -m pip show -f numpy | grep .dll"
6669
dash -c "/bin/tr -d '\r' <tools/list_installed_dll_dependencies_cygwin.sh >list_dlls_unix.sh"
67-
dash "list_dlls_unix.sh"
70+
dash "list_dlls_unix.sh" 3.8

tools/list_installed_dll_dependencies_cygwin.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111
# Cygwin-specific, but the rest should work on most platforms with
1212
# /bin/sh
1313

14-
py_ver=3.7
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)
14+
py_ver=${1}
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}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/dash
2+
# Rebase the dlls installed by NumPy
3+
4+
py_ver=${1}
5+
/usr/bin/rebase --database --oblivious `/bin/dash tools/list_numpy_dlls.sh ${py_ver}`

0 commit comments

Comments
 (0)