open-quantum-safe / liboqs-python

Python 3 bindings for liboqs
https://openquantumsafe.org/
MIT License
106 stars 36 forks source link

Question: Worth while automating install? #57

Closed baentsch closed 3 months ago

baentsch commented 1 year ago

Triggered by https://github.com/open-quantum-safe/liboqs/pull/1367 this is to ask whether it might be worth while extending setup.py along the lines shown e.g., here to build liboqs automatically when running the install (e.g., after making liboqs a git submodule of liboqs-python)? Have you already considered this once, @vsoftco ? Right now, running python3 setup.py install runs successfully even if liboqs has not been built (and/or is not on LD_LIBRARY_PATH) -- "just" the subsequent commands then don't work: At least confused me somewhat -- but then again, I'm no serious python user...

vsoftco commented 1 year ago

@baentsch Will look into this, thanks!

vsoftco commented 8 months ago

After some thought, I believe it's simpler to keep liboqs-pyhton not depend on liboqs as a git submodule. Main reason is that one may want to try testing different versions of liboqs, in which case having no dependency helps. Also, I didn't have the best experiences with git submodules, things tend to break. So I'll close this for now.

baentsch commented 8 months ago

Hmm -- can I ask you to consider the position of users, too, please? They want the code to build -- and run correctly. They want the "standard case" to work. Both would be guaranteed by way of submodule use.

Your concerns above are ones that could be solved by scripting (for your internal testing) and not breaking things: Indeed if something breaks, there is nearly always something wrong in the set-up, i.e., a real problem. Thus, sub-module relationships can very well serve as canaries for incorrect code (either up- or downstream or in the local package).

I see your frustration of not getting support by others helping you with this sub-project (and taking this issue on). I share it in all other sub-projects that I can devote more time to.

My approach there is to keep issues open, though, in the hope that some new contributors take them on and improve the overall situation. May I ask you to consider adopting this approach here, too?

vsoftco commented 7 months ago

@baentsch Sure Michael, thanks!! I've created https://github.com/open-quantum-safe/liboqs-python/tree/automate_install and I think I have some idea of how to automate installation of liboqs (in case it's not already installed).

vsoftco commented 3 months ago

Fixed by https://github.com/open-quantum-safe/liboqs-python/pull/80 For now, only UNIX-like platforms are supported. Having automatic installation on Windows seems challenging.