zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
U
O±d ã@sddZddlZddlZddlZddlmZmZddlZddlm    Z    ej
j e    ddej
j dd„ƒƒZ dS)    z$Tests for numpy.distutils.build_ext.éN)ÚindentÚdedent)ÚIS_WASMzcannot start subprocess in wasm)Úreasonc Cstddlm}|ƒst d¡t|ddƒ}| ttdƒdd¡W5QRXt|d    dƒ}| ttd
ƒdd¡W5QRXt|d dƒ}| d ¡W5QRXt|d dƒ6}tj     
tj      t ¡ddd¡}| td|›dƒ¡W5QRX|}t jtjd dddt|dƒdt|dƒgt|ƒdd}t|dƒ*}|D]}d|kr8| ¡}qXq8W5QRX|dk    spt‚dS)zY
    Ensures multiple "fake" static libraries are correctly linked.
    see gh-18295
    r)Úhas_f77_compilerzNo F77 compiler foundz    _dummy1.fÚwzL            FUNCTION dummy_one()
            RETURN
            END FUNCTIONz      )Úprefixz    _dummy2.fzL            FUNCTION dummy_two()
            RETURN
            END FUNCTIONz_dummy.czint PyInit_dummyext;zsetup.pyz..a@            def configuration(parent_package="", top_path=None):
                from numpy.distutils.misc_util import Configuration
                config = Configuration("", parent_package, top_path)
                config.add_library("dummy1", sources=["_dummy1.f"])
                config.add_library("dummy2", sources=["_dummy2.f"])
                config.add_extension("dummyext", sources=["_dummy.c"], libraries=["dummy1", "dummy2"])
                return config
 
 
            if __name__ == "__main__":
                import sys
                sys.path.insert(0, r"zv")
                from numpy.distutils.core import setup
                setup(**configuration(top_path="").todict())ÚbuildÚinstallz--prefixZ
installdirz--recordztmp_install_log.txt)ÚcwdNZdummyext)Znumpy.f2py.tests.utilrÚpytestÚskipÚopenÚwriterrÚosÚpathÚjoinÚdirnameÚ__file__Ú
subprocessÚ
check_callÚsysÚ
executableÚstrÚstripÚAssertionError)Ztmp_pathrZfidZsrctreeÚ    build_dirÚsoÚline©rú[d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\numpy/distutils/tests/test_build_ext.pyÚtest_multi_fortran_libs_link
sD 
 ý ý ô
 
þü
r!)Ú__doc__rrrÚtextwraprrr Z numpy.testingrÚmarkZskipifZslowr!rrrr Ú<module>s