Open robotanik opened 8 months ago
I'm hesitant to directly edit PATH
in the code, which is hacky. The simplest solution would be to add a note in the docs to ensure your PATH
is set correctly in the Windows environment.
Alternatively, we could consider migrating lib_name
in nicelib.build.build_lib()
to be more like header_info
, i.e. allow specifying paths alongside filenames.
For all I can see nicelib
doesn't handle the lib_name
like the header_info
and expects the file in the current directory or in the directory where the files are build. As a fall-back is utilises ctypes.util.find_library
to find the file, which fails if the directory is not in the PATH
. See here and here
I can add the requirement for the PATH
in the documentation, but may I add a check if the directory is in the current system path that raises an descriptive exception if it is not?
'ctypes.util.find_library' was not able to find the dll files so I added the path to the systempath