From ce7ffbf2cd3df1d41d5ba467b0f94299fd5e036d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= Date: Tue, 5 Jul 2022 14:06:43 -0400 Subject: [PATCH] build/python: add dist target --- python/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 9b263d20..595cded0 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -9,6 +9,10 @@ add_custom_target(python ALL COMMAND python3 setup.py build DEPENDS opendht opendht_cpp.pxd opendht.pyx pyproject.toml) +add_custom_target(dist + COMMAND python3 -m build + DEPENDS opendht opendht_cpp.pxd opendht.pyx pyproject.toml) + install(CODE "execute_process(COMMAND python3 setup.py install --root=\$ENV{DESTDIR}/ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") if (OPENDHT_TOOLS) install(PROGRAMS tools/dhtcluster.py DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME dhtcluster)