Skip to content

Instantly share code, notes, and snippets.

@zorun
Created May 31, 2016 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zorun/5d2495ef5547e6df3a5ede68cc97dea1 to your computer and use it in GitHub Desktop.
Save zorun/5d2495ef5547e6df3a5ede68cc97dea1 to your computer and use it in GitHub Desktop.
Python packaging suggestion
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index cd17547..22bf4a0 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -8,4 +8,4 @@ add_custom_target(python ALL
COMMAND python3 setup.py build
DEPENDS opendht opendht_cpp.pxd opendht.pyx)
-install(CODE "execute_process(COMMAND python3 setup.py install WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(CODE "execute_process(COMMAND python3 setup.py install --root=$ENV{DESTDIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment