Repository navigation
|
I just realized that I should include nanobind's license in my wheel distributions. I want to copy the license file at build-time, so that any updates to the license file are automatically applied. install(FILES ${SOME_PATH_TO_NANOBIND}/LICENSE DESTINATION ${SKBUILD_METADATA_DIR}/licenses RENAME LICENSE-nanobind.txt)How can I get the Or... is just copying the nanobind license file directly to my codebase a better solution? |
Replies: 1 comment 2 replies
|
get_filename_component(NB_DIR "${CMAKE_CURRENT_LIST_FILE}" REALPATH)
get_filename_component(NB_DIR "${NB_DIR}" PATH)
get_filename_component(NB_DIR "${NB_DIR}" PATH)
set(NB_DIR ${NB_DIR} CACHE INTERNAL "")So after install(FILES ${NB_DIR}/LICENSE
DESTINATION ${SKBUILD_METADATA_DIR}/licenses
RENAME LICENSE-nanobind.txt)One caveat: it's declared On your second question, copying the file into your repo is the safer choice if you'd rather not think about it again. nanobind is BSD-3-Clause and the text doesn't change, so the automatic updating you get from the dynamic version is mostly theoretical. |
I certainly include nanobind's license in my
hpkpackage for FFTs. It would be unethical not to do so.It's not a burden to commit a file
LICENSE-nanobind.txtto the top-level directory of your codebase.Scikit-build-core will automatically include it in your wheel. See: wheel.license-files