diff --git a/cuckoo_time_translator_python/CMakeLists.txt b/cuckoo_time_translator_python/CMakeLists.txt index 1057303..5d29ff2 100644 --- a/cuckoo_time_translator_python/CMakeLists.txt +++ b/cuckoo_time_translator_python/CMakeLists.txt @@ -34,22 +34,20 @@ cs_add_library(${PROJECT_NAME} src/module.cpp NO_AUTO_EXPORT ) - -string(REGEX REPLACE "_python$" "" LIB_OUTPUT_DIR ${CATKIN_PACKAGE_PYTHON_DESTINATION}) set_target_properties(${PROJECT_NAME} PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${LIB_OUTPUT_DIR} + LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION} ) if (APPLE) set_target_properties(${PROJECT_NAME} PROPERTIES - SUFFIX ".so" # This is apparently needed for Darvin. But why + SUFFIX ".so" # This is apparently needed for Darvin. But why? ) endif () target_link_libraries(${PROJECT_NAME} ${PYTHON_LIBRARY} ${Boost_LIBRARIES}) -install(FILES ${CATKIN_DEVEL_PREFIX}/${LIB_OUTPUT_DIR}/lib${PROJECT_NAME}.so - DESTINATION ${LIB_OUTPUT_DIR} +install(FILES ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}/lib${PROJECT_NAME}.so + DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION} ) cs_export() diff --git a/cuckoo_time_translator_python/python/cuckoo_time_translator/__init__.py b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/__init__.py similarity index 100% rename from cuckoo_time_translator_python/python/cuckoo_time_translator/__init__.py rename to cuckoo_time_translator_python/python/cuckoo_time_translator_python/__init__.py diff --git a/cuckoo_time_translator_python/python/cuckoo_time_translator/algorithms.py b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/algorithms.py similarity index 100% rename from cuckoo_time_translator_python/python/cuckoo_time_translator/algorithms.py rename to cuckoo_time_translator_python/python/cuckoo_time_translator_python/algorithms.py diff --git a/cuckoo_time_translator_python/python/cuckoo_time_translator/batch_algo.py b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/batch_algo.py similarity index 100% rename from cuckoo_time_translator_python/python/cuckoo_time_translator/batch_algo.py rename to cuckoo_time_translator_python/python/cuckoo_time_translator_python/batch_algo.py diff --git a/cuckoo_time_translator_python/python/cuckoo_time_translator/device_time_bags.py b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/device_time_bags.py similarity index 100% rename from cuckoo_time_translator_python/python/cuckoo_time_translator/device_time_bags.py rename to cuckoo_time_translator_python/python/cuckoo_time_translator_python/device_time_bags.py diff --git a/cuckoo_time_translator_python/python/cuckoo_time_translator/plotting.py b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/plotting.py similarity index 100% rename from cuckoo_time_translator_python/python/cuckoo_time_translator/plotting.py rename to cuckoo_time_translator_python/python/cuckoo_time_translator_python/plotting.py diff --git a/cuckoo_time_translator_python/python/cuckoo_time_translator/timestamp_owts.py b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/timestamp_owts.py similarity index 95% rename from cuckoo_time_translator_python/python/cuckoo_time_translator/timestamp_owts.py rename to cuckoo_time_translator_python/python/cuckoo_time_translator_python/timestamp_owts.py index 436c053..0c458e0 100644 --- a/cuckoo_time_translator_python/python/cuckoo_time_translator/timestamp_owts.py +++ b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/timestamp_owts.py @@ -1,7 +1,6 @@ import numpy as np -import cuckoo_time_translator.algorithms as algorithms - -from cuckoo_time_translator.algorithms import LocalTime, RemoteTime +import cuckoo_time_translator_python.algorithms as algorithms +from cuckoo_time_translator_python.algorithms import LocalTime, RemoteTime class TimestampOwt: diff --git a/cuckoo_time_translator_python/python/cuckoo_time_translator/timestamp_series.py b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/timestamp_series.py similarity index 100% rename from cuckoo_time_translator_python/python/cuckoo_time_translator/timestamp_series.py rename to cuckoo_time_translator_python/python/cuckoo_time_translator_python/timestamp_series.py diff --git a/cuckoo_time_translator_python/python/cuckoo_time_translator/tools.py b/cuckoo_time_translator_python/python/cuckoo_time_translator_python/tools.py similarity index 100% rename from cuckoo_time_translator_python/python/cuckoo_time_translator/tools.py rename to cuckoo_time_translator_python/python/cuckoo_time_translator_python/tools.py diff --git a/cuckoo_time_translator_python/scripts/ctt_introspect.py b/cuckoo_time_translator_python/scripts/ctt_introspect.py index e0a6ebc..8f12cb2 100755 --- a/cuckoo_time_translator_python/scripts/ctt_introspect.py +++ b/cuckoo_time_translator_python/scripts/ctt_introspect.py @@ -3,12 +3,12 @@ import sys import numpy as np -from cuckoo_time_translator import * -from cuckoo_time_translator.device_time_bags import * -from cuckoo_time_translator.timestamp_owts import * -from cuckoo_time_translator.batch_algo import printDelayStat +from cuckoo_time_translator_python import * +from cuckoo_time_translator_python.device_time_bags import * +from cuckoo_time_translator_python.timestamp_owts import * +from cuckoo_time_translator_python.batch_algo import printDelayStat -from cuckoo_time_translator.tools import * +from cuckoo_time_translator_python.tools import * OwtsDefault = 'KalmanOwt(), ConvexHullOwt(switchTime = 100)' @@ -96,9 +96,9 @@ def addToPlot(times, label, color): for d, lab in zip(delaysToPlot, labels): printDelayStat(d, lab) - from cuckoo_time_translator.plotting import plotMultiDelays, show + from cuckoo_time_translator_python.plotting import plotMultiDelays, show plotMultiDelays(base_times, delaysToPlot, "time [sec]", labels, markersize=4, colors=colors, fileName=args.output, overwrite=args.force, show=False) if not args.output: - from cuckoo_time_translator.plotting import show + from cuckoo_time_translator_python.plotting import show show() diff --git a/cuckoo_time_translator_python/setup.py b/cuckoo_time_translator_python/setup.py index 2b7f7e3..90ee9d9 100644 --- a/cuckoo_time_translator_python/setup.py +++ b/cuckoo_time_translator_python/setup.py @@ -6,7 +6,7 @@ # fetch values from package.xml setup_args = generate_distutils_setup( - packages=['cuckoo_time_translator'], + packages=['cuckoo_time_translator_python'], package_dir={'':'python'}, scripts=['scripts/ctt_introspect.py'] ) diff --git a/cuckoo_time_translator_python/test/Test.py b/cuckoo_time_translator_python/test/Test.py index 3eafb88..af7955f 100755 --- a/cuckoo_time_translator_python/test/Test.py +++ b/cuckoo_time_translator_python/test/Test.py @@ -1,6 +1,6 @@ #!/usr/bin/env python import os -from cuckoo_time_translator.algorithms import * +from cuckoo_time_translator_python.algorithms import * import unittest