Skip to content

fixes building for thorlabs kinesis devices#167

Open
robotanik wants to merge 1 commit into
mabuchilab:masterfrom
robotanik:patch-2
Open

fixes building for thorlabs kinesis devices#167
robotanik wants to merge 1 commit into
mabuchilab:masterfrom
robotanik:patch-2

Conversation

@robotanik

Copy link
Copy Markdown

'ctypes.util.find_library' was not able to find the dll files so I added the path to the systempath

'ctypes.util.find_library' was not able to find the dll files so I added the path to the systempath
@natezb

natezb commented Nov 15, 2023

Copy link
Copy Markdown
Contributor

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.

@robotanik

Copy link
Copy Markdown
Author

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_libraryto 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants