-
Notifications
You must be signed in to change notification settings - Fork 28
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
ENH: Build and bundle liblsl in wheels #351
Conversation
@larsoner Finally managed to run the 0971b29 runs it also for the emulated In the end, I configured the Also updated the documentation, added configuration variable to disable the build, added upload of the artifacts as release assets.. and tackled the last bullet points listed in this PR. Happy to merge :) |
Always is! 😆
Like the I wouldn't bother running them on the emulated architecture, I'm not surprised they fail. At some point I think GH plans to have native aarch64, we can test more completely then I think. |
class BinaryDistribution(Distribution): # noqa: D101 | ||
def has_ext_modules(self): # noqa: D102 | ||
return True |
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.
Much less of a hack than what I was doing 🙂
src/mne_lsl/lsl/load_liblsl.py
Outdated
# TODO: Check if the minimum version for MNE-LSL requires those try/except. | ||
try: | ||
lib.lsl_pull_chunk_f.restype = c_long | ||
lib.lsl_pull_chunk_d.restype = c_long | ||
lib.lsl_pull_chunk_l.restype = c_long | ||
lib.lsl_pull_chunk_i.restype = c_long | ||
lib.lsl_pull_chunk_s.restype = c_long | ||
lib.lsl_pull_chunk_c.restype = c_long | ||
lib.lsl_pull_chunk_str.restype = c_long | ||
lib.lsl_pull_chunk_buf.restype = c_long | ||
except Exception: # pragma: no cover | ||
logger.info( | ||
"[LIBLSL] Chunk transfer functions not available in your LIBLSL version." | ||
) | ||
try: | ||
lib.lsl_create_continuous_resolver.restype = c_void_p | ||
lib.lsl_create_continuous_resolver_bypred.restype = c_void_p | ||
lib.lsl_create_continuous_resolver_byprop.restype = c_void_p | ||
except Exception: # pragma: no cover | ||
logger.info( | ||
"[LIBLSL] Continuous resolver functions not available in your LIBLSL " | ||
"version." | ||
) |
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.
Now that we bundle and conda-forge is probably sufficiently up to date, maybe we don't need these EDIT: inside a try/except?
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.
Someone could provide an old liblsl
in the environment variable; so even if it's unlikely, it doesn't hurt to have this try/except caught this edge case.
Agree and done! |
liblsl
as a git submodule, withv1.16.2
checked outcffi
module that will be compiled during installation that exposes one function fromliblsl
. This will make it so that once we...cibuildwheel
config (and CI run),auditwheel
and related utils will pullliblsl
into the wheel for us_load_liblsl_mne_lsl
,_fetch_liblsl
no longer necessary now thatpip
wheels andconda
should work automatically?)publish.yml
tobuild_wheels.yml
(or vice-versa)pytest.yml
(probably just high/low i.e. 3.10 and 3.13, no need for 3.11 and 3.12?) to reduce CI burdenLocally on Linux things seem to work: