From e1607f5e07cd753ad274e4b4cb9c9e5818ddfe2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Moreno?= Date: Mon, 8 Apr 2024 15:58:53 +0200 Subject: [PATCH] Refs #20763. Applying discovery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ricardo González Moreno --- fastdds_python/src/swig/CMakeLists.txt | 2 +- fastdds_python/test/api/test_datareader.py | 8 -------- fastdds_python/test/api/test_qos.py | 6 ------ fastdds_python/test/api/test_waitset.py | 8 -------- fastdds_python/test/types/CMakeLists.txt | 7 +++---- fastdds_python_examples/HelloWorldExample/CMakeLists.txt | 3 +-- .../HelloWorldExample/HelloWorldExample.py | 6 ------ 7 files changed, 5 insertions(+), 35 deletions(-) diff --git a/fastdds_python/src/swig/CMakeLists.txt b/fastdds_python/src/swig/CMakeLists.txt index 393643b4..e785b898 100644 --- a/fastdds_python/src/swig/CMakeLists.txt +++ b/fastdds_python/src/swig/CMakeLists.txt @@ -67,7 +67,7 @@ execute_process(COMMAND ${Python3_EXECUTABLE} -c "from distutils import sysconfi get_filename_component (_ABS_PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH} ABSOLUTE) file (RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH}) SET (PYTHON_MODULE_PATH - ${_REL_PYTHON_MODULE_PATH} + ${_REL_PYTHON_MODULE_PATH}/${${PROJECT_NAME}_MODULE} ) # Install diff --git a/fastdds_python/test/api/test_datareader.py b/fastdds_python/test/api/test_datareader.py index a7bcdde4..1b3f6204 100644 --- a/fastdds_python/test/api/test_datareader.py +++ b/fastdds_python/test/api/test_datareader.py @@ -1,11 +1,3 @@ -# until https://bugs.python.org/issue46276 is not fixed we can apply this -# workaround on windows -import os -if os.name == 'nt': - import win32api - win32api.LoadLibrary('test_complete') - win32api.LoadLibrary('test_modules') - import fastdds import pytest import time diff --git a/fastdds_python/test/api/test_qos.py b/fastdds_python/test/api/test_qos.py index 6d4d6fc1..8a80e0f5 100644 --- a/fastdds_python/test/api/test_qos.py +++ b/fastdds_python/test/api/test_qos.py @@ -1,11 +1,5 @@ import os -# until https://bugs.python.org/issue46276 is not fixed we can apply this -# workaround on windows -if os.name == 'nt': - import win32api - win32api.LoadLibrary('_fastdds_python.pyd') - import fastdds import inspect diff --git a/fastdds_python/test/api/test_waitset.py b/fastdds_python/test/api/test_waitset.py index 584a58c1..8c340816 100644 --- a/fastdds_python/test/api/test_waitset.py +++ b/fastdds_python/test/api/test_waitset.py @@ -1,11 +1,3 @@ -# until https://bugs.python.org/issue46276 is not fixed we can apply this -# workaround on windows -import os -if os.name == 'nt': - import win32api - win32api.LoadLibrary('test_complete') - win32api.LoadLibrary('test_modules') - import fastdds import pytest diff --git a/fastdds_python/test/types/CMakeLists.txt b/fastdds_python/test/types/CMakeLists.txt index 7a99c986..856c27a4 100644 --- a/fastdds_python/test/types/CMakeLists.txt +++ b/fastdds_python/test/types/CMakeLists.txt @@ -105,7 +105,7 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig get_filename_component (_ABS_PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH} ABSOLUTE) file (RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH}) SET (PYTHON_MODULE_PATH - ${_REL_PYTHON_MODULE_PATH} + ${_REL_PYTHON_MODULE_PATH}/${PROJECT_NAME} ) # Install @@ -212,7 +212,7 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig get_filename_component (_ABS_PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH} ABSOLUTE) file (RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH}) SET (PYTHON_MODULE_PATH - ${_REL_PYTHON_MODULE_PATH} + ${_REL_PYTHON_MODULE_PATH}/${PROJECT_NAME} ) # Install @@ -320,7 +320,7 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig get_filename_component (_ABS_PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH} ABSOLUTE) file (RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH}) SET (PYTHON_MODULE_PATH - ${_REL_PYTHON_MODULE_PATH} + ${_REL_PYTHON_MODULE_PATH}/${PROJECT_NAME} ) # Install @@ -332,4 +332,3 @@ install(TARGETS ${PROJECT_NAME} install(TARGETS ${${PROJECT_NAME}_MODULE} DESTINATION ${PYTHON_MODULE_PATH}/) get_property(support_files TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_SUPPORT_FILES) install(FILES ${support_files} DESTINATION ${PYTHON_MODULE_PATH}/) - diff --git a/fastdds_python_examples/HelloWorldExample/CMakeLists.txt b/fastdds_python_examples/HelloWorldExample/CMakeLists.txt index 25a2df56..08cc2db7 100644 --- a/fastdds_python_examples/HelloWorldExample/CMakeLists.txt +++ b/fastdds_python_examples/HelloWorldExample/CMakeLists.txt @@ -105,7 +105,7 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig get_filename_component (_ABS_PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH} ABSOLUTE) file (RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH}) SET (PYTHON_MODULE_PATH - ${_REL_PYTHON_MODULE_PATH} + ${_REL_PYTHON_MODULE_PATH}/${PROJECT_NAME} ) # Install @@ -117,4 +117,3 @@ install(TARGETS ${PROJECT_NAME} install(TARGETS ${${PROJECT_NAME}_MODULE} DESTINATION ${PYTHON_MODULE_PATH}/) get_property(support_files TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_SUPPORT_FILES) install(FILES ${support_files} DESTINATION ${PYTHON_MODULE_PATH}/) - diff --git a/fastdds_python_examples/HelloWorldExample/HelloWorldExample.py b/fastdds_python_examples/HelloWorldExample/HelloWorldExample.py index f3b0b513..bb332161 100644 --- a/fastdds_python_examples/HelloWorldExample/HelloWorldExample.py +++ b/fastdds_python_examples/HelloWorldExample/HelloWorldExample.py @@ -19,12 +19,6 @@ import argparse from threading import Condition -# until https://bugs.python.org/issue46276 is not fixed we can apply this -# workaround on windows -if os.name == 'nt': - import win32api - win32api.LoadLibrary('HelloWorld') - import fastdds import HelloWorld