Skip to content

Commit

Permalink
Refs #20763. Applying discovery
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware committed Apr 8, 2024
1 parent 8a20026 commit e1607f5
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 35 deletions.
2 changes: 1 addition & 1 deletion fastdds_python/src/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions fastdds_python/test/api/test_datareader.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 0 additions & 6 deletions fastdds_python/test/api/test_qos.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 0 additions & 8 deletions fastdds_python/test/api/test_waitset.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
7 changes: 3 additions & 4 deletions fastdds_python/test/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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}/)

3 changes: 1 addition & 2 deletions fastdds_python_examples/HelloWorldExample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}/)

Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e1607f5

Please sign in to comment.