catkin can't find python service files
I've got a python node which runs a service server. Catkin builds it fine and builds the service files (works fine for another package in C++ which uses the same .srv file). Even though it builds the file fine, at runtime the node can't import it. If I revise the python search path as shown:
PYTHONPATH='/home/blake/Projects/Ros/catkin_ws/devel/lib/python2.7/dist-packages/retractor_ros/srv/':$PYTHONPATH
it works. Here's my CMakelist.txt
cmake_minimum_required(VERSION 2.8.3) project(retractor_ros) set(BH_LIB_NAME XXXXXXXXXXX) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRE COMPONENTS xyz) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS rospy roscpp std_msgs message_generation ${BH_LIB_NAME} ) ## Generate services in the 'srv' folder add_service_files( FILES PhidgetsServoCommand.srv # Service1.srv # Service2.srv ) ## Generate added messages and services with any dependencies listed here generate_messages( DEPENDENCIES std_msgs ) catkin_package( INCLUDE_DIRS # LIBRARIES ${BH_LIB_NAME} CATKIN_DEPENDS message_runtime rospy roscpp std_msgs rstate_machine # DEPENDS system_lib ) ########### ## Build ## ########### include_directories( ${catkin_INCLUDE_DIRS} # /opt/ros/hydro/include/turtle_actionlib /home/blake/Projects/Ros/catkin_ws/devel/include/retractor_ros /home/blake/Projects/Ros/catkin_ws/src/pwm_ros /home/blake/Projects/Ros/catkin_ws/src/rstate_machine/include ) ## Declare a cpp executable add_executable(retractor_ros_node retractor_fsm.cpp keyinput.cpp) target_link_libraries(retractor_ros_node ${BH_LIB_NAME} ${catkin_LIBRARIES}) add_dependencies(${PROJECT_NAME}_node servo_fsm_generate_messages_cpp keyinput.cpp rstate_machine.cpp) install(PROGRAMS scripts/pwm_servo.py ../devel/lib/retractor_ros/retractor_ros_node DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) ## Mark executables and/or libraries for installation install(TARGETS retractor_ros_node # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} )