Skip to content

Commit a85b04f

Browse files
committed
fixup! ci,python: enable python win2022 serial build
1 parent 0a9d80f commit a85b04f

File tree

5 files changed

+23
-20
lines changed

5 files changed

+23
-20
lines changed

bindings/Python/__init__.py.in

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
import os
2-
import sys
3-
4-
from pathlib import Path
5-
6-
sys.path.append(os.path.dirname(__file__))
7-
8-
if sys.platform.startswith('win'):
9-
print("Inject dll")
10-
os.add_dll_directory(os.path.dirname(__file__))
11-
os.add_dll_directory(Path("@CMAKE_LIBRARY_OUTPUT_DIRECTORY@"))
12-
os.add_dll_directory(Path("@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\Debug"))
13-
14-
print(sys.path)
15-
print(os.listdir(os.path.dirname(__file__)))
16-
print(Path("@CMAKE_LIBRARY_OUTPUT_DIRECTORY@"))
17-
print(Path("@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"))
18-
19-
from adios2_bindings@ADIOS2_LIBRARY_SUFFIX@ import *
1+
from .adios2_bindings@ADIOS2_LIBRARY_SUFFIX@ import *
202

213
__version__ = "@ADIOS2_VERSION@"

cmake/ADIOSFunctions.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ function(python_add_test)
8888
"PYTHONPATH=${ADIOS2_BINARY_DIR}/${CMAKE_INSTALL_PYTHONDIR}:$ENV{PYTHONPATH}"
8989
)
9090
else()
91-
file(TO_NATIVE_PATH "<path>" <variable>)
9291
set_property(TEST ${ARGS_NAME} PROPERTY
9392
ENVIRONMENT
9493
"PYTHONPATH=${ADIOS2_BINARY_DIR}/${CMAKE_INSTALL_PYTHONDIR};$<SHELL_PATH:$<TARGET_FILE_DIR:adios2_py>>;$ENV{PYTHONPATH}"

python/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ install(DIRECTORY ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2/
1616
DESTINATION ${install_location}
1717
COMPONENT adios2_python-python
1818
${ADIOS2_MAYBE_EXCLUDE_FROM_ALL}
19+
PATTERN "*.py"
20+
PATTERN "setup_testing.py" EXCLUDE
1921
)

python/adios2/setup_testing.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
import sys
3+
4+
from pathlib import Path
5+
6+
sys.path.append(os.path.dirname(__file__))
7+
8+
if sys.platform.startswith('win'):
9+
print("Inject dll")
10+
os.add_dll_directory(os.path.dirname(__file__))
11+
os.add_dll_directory(Path("@CMAKE_LIBRARY_OUTPUT_DIRECTORY@"))
12+
os.add_dll_directory(Path("@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\Debug"))
13+
14+
print(sys.path)
15+
print(os.listdir(os.path.dirname(__file__)))
16+
print(Path("@CMAKE_LIBRARY_OUTPUT_DIRECTORY@"))
17+
print(Path("@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"))

testing/adios2/python/TestAttribute.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This should go first
2+
import adios2.setup_testing
3+
14
from adios2.adios import Adios
25

36
import adios2.bindings as bindings

0 commit comments

Comments
 (0)