-
Notifications
You must be signed in to change notification settings - Fork 62
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
Test separately built catalogues #1748
Conversation
bcumming
commented
Nov 8, 2021
•
edited
Loading
edited
- add a test that tests that a catalogue built separately can be loaded via the Python interface
- further simplification of dynamic library support
- move all platform-specific code into the cpp implementation and out of header.
- Merge branch 'test_catalogue' - move code that directly handles dl_* inside a translation unit: - avoid poluting other translation units with system headers. - remove risk of multiple definitions of functions if the dl_* code was ever used in more than one translation unit. - make test that checks whether a catalogue can be loaded in python a stand alone script - remove redundant CMake requirement that Arbor is being built on UNIX because Arbor only supports UNIX platforms, and the ARB_HAVE_DL definition implied that it was possible to build Arbor without it set (which wasn't true)
arbor/util/dylib.cpp
Outdated
namespace arb { | ||
namespace util { | ||
|
||
struct dl_handle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant now, it was meant as an opaque handle, but if it's not exposed, it can go.
scripts/test-catalogue.py
Outdated
print('ERROR: unable to open catalogue file') | ||
sys.exit(1) | ||
|
||
print(ctypes.CDLL(catname)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also redundant: Debugging left-overs.
scripts/test-catalogue.py
Outdated
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
import ctypes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also go.
This PR updates pybind11, can we add that to the PR message with the version info? |
@noraabiakar I can't understand why the PR shows pybind11 being updated: the pybind11 commit in the branch and in master are exactly the same, and the changes shown in the "Files changed" tab show pybind11 being updated to that same commit. So I don't think anything is actually being changed. It looks like GitHub is getting confused by the slightly convoluted history of the commits in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from a tiny typo and the pybind divergence everything's well.
arbor/util/dylib.hpp
Outdated
} | ||
|
||
} // namespace util | ||
} // namespace arbo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arbo
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pybind11 malaise clarified offline, all good.
* add a test that tests that a catalogue built separately can be loaded via the Python interface * further simplification of dynamic library support * move all platform-specific code into the cpp implementation and out of header.