Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes building for thorlabs kinesis devices #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robotanik
Copy link

'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
Copy link
Contributor

natezb commented Nov 15, 2023

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