SwatPhonLab / UltraTrace

A Free/Open-Source tool for manual annotation of Ultrasound Tongue Imaging data.
GNU General Public License v3.0
10 stars 5 forks source link

remove dependence on libmagic #179

Open jonorthwash opened 1 year ago

jonorthwash commented 1 year ago

libmagic and especially libmagic-bin are the dependencies that make UltraTrace most difficult to deal with on Windows.

Alternatives to this dependency can be investigated and tested.

keggsmurph21 commented 1 year ago

libmagic and especially libmagic-bin are the dependencies that make UltraTrace most difficult to deal with on Windows.

Hm, I'm not very familiar with programming on Windows.. do you know more specifically what the issue is?

jonorthwash commented 1 year ago

The main issue is that the only version available via pip3 on Windows where both packages correspond (=compatible) is rather old, and it's a version that's not available via pip3 for Linux. So the requirements.txt file becomes platform specific.

jonorthwash commented 1 year ago

I've also been having trouble with it on recent versions of macOS. The only way to install it seems to be to manually clone and compile?

keggsmurph21 commented 1 year ago

Haha well luckily we don't actually need this library (AFAICT...).

jonorthwash commented 1 year ago

Wait really? Then can we just remove the code that calls it?

kmurphy4 commented 1 year ago

I didn't see anything that called it, but maybe i missed something?

jonorthwash commented 1 year ago

If needed, this seems like a good alternative https://github.com/trailofbits/polyfile

jonorthwash commented 1 year ago

I didn't see anything that called it, but maybe i missed something?

The file detection stuff needs it: https://github.com/SwatPhonLab/UltraTrace/blob/da0121238ea53413e3227ae61aa293ebbd526cc2/ultratrace/modules/metadata.py#L93-L126

jonorthwash commented 1 year ago

So the task of the person completing this issue would be to convert those ~30 lines to use polyfile instead of libmagic.