mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-28 12:06:59 +03:00
Replace deprecated Python distutils by "site" module.
This commit is contained in:
@@ -395,7 +395,7 @@ install(FILES "avrdude.1"
|
||||
)
|
||||
|
||||
if(HAVE_SWIG)
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import site; print(site.getsitepackages()[0])"
|
||||
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
install(TARGETS swig_avrdude DESTINATION ${PYTHON_SITE_PACKAGES})
|
||||
install(FILES ${CMAKE_BINARY_DIR}/src/swig_avrdude.py DESTINATION ${PYTHON_SITE_PACKAGES})
|
||||
|
||||
Reference in New Issue
Block a user