File tree Expand file tree Collapse file tree 4 files changed +14
-17
lines changed Expand file tree Collapse file tree 4 files changed +14
-17
lines changed Original file line number Diff line number Diff line change 6464 run : |
6565 ctest --test-dir build --output-on-failure
6666
67+ - name : Unit tests as installed
68+ run : |
69+ sudo cp build/lib/libamrex_*.so /usr/lib/
70+ rm -rf build
71+ python3 -m pytest tests
72+
6773 clang6 :
68746975 runs-on : ubuntu-20.04
Original file line number Diff line number Diff line change 6464 if(!$?) { Exit $LASTEXITCODE }
6565 cmake --build build --config Debug --target pip_install
6666 if(!$?) { Exit $LASTEXITCODE }
67+ - name : Unit tests as Installed
68+ run : |
69+ $env:PATH += ';C:/Program Files (x86)/pyAMReX/bin/'
70+ rm -r -fo build
71+ python3 -m pytest tests
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ set(pyAMReX_CUSTOM_TARGET_PREFIX "${_pyAMReX_CUSTOM_TARGET_PREFIX_DEFAULT}"
249249add_custom_target (${pyAMReX_CUSTOM_TARGET_PREFIX} pip_wheel
250250 ${CMAKE_COMMAND} -E rm -f -r amrex-whl
251251 COMMAND
252- ${CMAKE_COMMAND} -E env PYAMREX_LIBDIR=$<TARGET_FILE_DIR:pyAMReX_ ${AMReX_SPACEDIM_LAST} d>
252+ ${CMAKE_COMMAND} -E env PYAMREX_LIBDIR=${CMAKE_PYTHON_OUTPUT_DIRECTORY} /amrex/
253253 ${Python_EXECUTABLE} -m pip wheel -v --no -build -isolation --no -deps --wheel-dir=amrex-whl ${pyAMReX_SOURCE_DIR}
254254 WORKING_DIRECTORY
255255 ${pyAMReX_BINARY_DIR}
Original file line number Diff line number Diff line change @@ -41,23 +41,9 @@ def run(self):
4141 # call superclass
4242 build .run (self )
4343
44- # matches: amrex_*d_pybind.*.(so|pyd)
45- re_libprefix = re .compile (r"amrex_.d_pybind\..*\.(?:so|pyd)" )
46- libs_found = []
47- for lib_name in os .listdir (PYAMREX_libdir ):
48- if re_libprefix .match (lib_name ):
49- lib_path = os .path .join (PYAMREX_libdir , lib_name )
50- libs_found .append (lib_path )
51- if len (libs_found ) == 0 :
52- raise RuntimeError (
53- "Error: no pre-build pyAMReX libraries found in "
54- "PYAMREX_libdir='{}'" .format (PYAMREX_libdir )
55- )
56-
57- # copy external libs into collection of files in a temporary build dir
44+ # copy Python module artifacts and sources
5845 dst_path = os .path .join (self .build_lib , "amrex" )
59- for lib_path in libs_found :
60- shutil .copy (lib_path , dst_path )
46+ shutil .copytree (PYAMREX_libdir , dst_path , dirs_exist_ok = True )
6147
6248
6349class CMakeExtension (Extension ):
You can’t perform that action at this time.
0 commit comments