diff options
| author | DWesl <22566757+DWesl@users.noreply.github.com> | 2023-01-29 11:50:51 -0500 |
|---|---|---|
| committer | DWesl <22566757+DWesl@users.noreply.github.com> | 2023-01-29 11:50:51 -0500 |
| commit | 2fa4441529747b2ff9c712f5c102267888da1f80 (patch) | |
| tree | de4bae70f43e171b754775642ce6b94ac0a930c7 /numpy/f2py/tests | |
| parent | 83f62a99684396736dea901e4885a3715e5a74bf (diff) | |
| download | numpy-2fa4441529747b2ff9c712f5c102267888da1f80.tar.gz | |
TST: Rebase F2Py-built extension modules.
Also adjust CI so they don't immediately collide with NumPy.
I forgot to do that last time, which caused problems.
Diffstat (limited to 'numpy/f2py/tests')
| -rw-r--r-- | numpy/f2py/tests/util.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/numpy/f2py/tests/util.py b/numpy/f2py/tests/util.py index 1534c4e7d..f4d19dd1c 100644 --- a/numpy/f2py/tests/util.py +++ b/numpy/f2py/tests/util.py @@ -6,6 +6,7 @@ Utility functions for - determining paths to tests """ +import glob import os import sys import subprocess @@ -30,6 +31,9 @@ from importlib import import_module _module_dir = None _module_num = 5403 +if sys.platform == "cygwin": + _module_list = [] + def _cleanup(): global _module_dir @@ -147,6 +151,21 @@ def build_module(source_files, options=[], skip=[], only=[], module_name=None): for fn in dst_sources: os.unlink(fn) + # Rebase (Cygwin-only) + if sys.platform == "cygwin": + # If someone starts deleting modules after import, this will + # need to change to record how big each module is, rather than + # relying on rebase being able to find that from the files. + _module_list.extend( + glob.glob(os.path.join(d, "{:s}*".format(module_name))) + ) + subprocess.check_call( + ["/usr/bin/rebase", "--database", "--oblivious", "--verbose"] + + _module_list + ) + + + # Import return import_module(module_name) |
