aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorTrung Tran <trung.tran@ettus.com>2019-02-24 22:54:25 -0800
committerMichael West <michael.west@ettus.com>2019-03-05 10:30:36 -0800
commit192c7ca20a27e586491d42a2ec719d0bc6f66bee (patch)
treed47fdb36d542f8352fc8aac33f133019c70462ab /host
parent16ef5140ca1dee3893be21cef116ad1dc09e4aef (diff)
downloaduhd-192c7ca20a27e586491d42a2ec719d0bc6f66bee.tar.gz
uhd-192c7ca20a27e586491d42a2ec719d0bc6f66bee.tar.bz2
uhd-192c7ca20a27e586491d42a2ec719d0bc6f66bee.zip
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 <trung.tran@ettus.com>
Diffstat (limited to 'host')
-rw-r--r--host/python/CMakeLists.txt3
-rwxr-xr-xhost/python/setup.py.in2
2 files changed, 3 insertions, 2 deletions
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'],