diff options
| author | DWesl <22566757+DWesl@users.noreply.github.com> | 2023-01-26 14:29:13 -0500 |
|---|---|---|
| committer | DWesl <22566757+DWesl@users.noreply.github.com> | 2023-01-26 14:29:13 -0500 |
| commit | 608864613b801b9c85573186a9d07eeac5e7e465 (patch) | |
| tree | 3f1718c8b065fee13907d1ce5303803ccda210e8 /numpy/f2py/tests/util.py | |
| parent | 32229622d50394fd950d876380c8336caefc3183 (diff) | |
| download | numpy-608864613b801b9c85573186a9d07eeac5e7e465.tar.gz | |
TST: Rebase F2Py test modules on Cygwin.
Let's see if this fixes the 8-50 fork failures.
Diffstat (limited to 'numpy/f2py/tests/util.py')
| -rw-r--r-- | numpy/f2py/tests/util.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/numpy/f2py/tests/util.py b/numpy/f2py/tests/util.py index 1534c4e7d..0f558c6dd 100644 --- a/numpy/f2py/tests/util.py +++ b/numpy/f2py/tests/util.py @@ -30,6 +30,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 +150,19 @@ def build_module(source_files, options=[], skip=[], only=[], module_name=None): for fn in dst_sources: os.unlink(fn) + # Rebase + 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) |
