From 192c7ca20a27e586491d42a2ec719d0bc6f66bee Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Sun, 24 Feb 2019 22:54:25 -0800 Subject: python: cmake: Use native format for setup.py setuptools isn't compatible with Unix style path on Windows 10 machines. We need to convert any path before running setuptools. Signed-off-by: Trung Tran --- host/python/CMakeLists.txt | 3 ++- host/python/setup.py.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt index 07791de55..d0a6e2204 100644 --- a/host/python/CMakeLists.txt +++ b/host/python/CMakeLists.txt @@ -49,7 +49,8 @@ set(PYUHD_FILES set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in") set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py") set(TIMESTAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp") - +# convert binary directory to native format to use in SETUP_PY file. +file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR} NATIVE_CURRENT_BINARY_DIR) configure_file(${SETUP_PY_IN} ${SETUP_PY}) add_custom_command(OUTPUT ${TIMESTAMP_FILE} diff --git a/host/python/setup.py.in b/host/python/setup.py.in index 3c2176c0e..4d2df10a5 100755 --- a/host/python/setup.py.in +++ b/host/python/setup.py.in @@ -23,7 +23,7 @@ setup(name='uhd', author_email='packages@ettus.com', url='https://www.ettus.com/', license='GPLv3', - package_dir={'': '${CMAKE_CURRENT_BINARY_DIR}'}, + package_dir={'': r'${NATIVE_CURRENT_BINARY_DIR}'}, package_data={'uhd': ['*.so']}, zip_safe=False, packages=['uhd'], -- cgit v1.2.3