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

Standalone binaries/executables #61

Closed
decnorton opened this issue Jun 24, 2021 · 3 comments
Closed

Standalone binaries/executables #61

decnorton opened this issue Jun 24, 2021 · 3 comments

Comments

@decnorton
Copy link

Hi there,

We're looking at supporting encrypted files when accepting files for importing data into our application (currently we have to ask users to remove the password protection first).

This tool works great (thanks!) for decrypting on environments where python is available & the correct dependencies are installed - however I'd like to try and make our deployment as lean as possible by including a pre-compiled binary with no dependency on having Python already installed (we lack any strong Python experience in the team, so would like to avoid any problems that arise as a result).

I've had a play around with pyinstaller with limited success. It gave me an executable that I could use, however it was struggling with handling relative imports. The resulting executable was around 6MB which seems like a worthwhile sacrifice for the transportability.

I'm too much of a Python noob to figure out the pyinstaller issues, but I'm pretty confident it can be accomplished with some help!

Would you consider providing standalone binaries/executables, or perhaps even an 'official' Docker image with your releases?

Many thanks,
Dec

@nolze
Copy link
Owner

nolze commented Jun 25, 2021

Thank you for your suggestions!

Would you consider providing standalone binaries/executables, or perhaps even an 'official' Docker image with your releases?

As for the project itself, providing standalone binaries is outside the scope for now.
The same is true for Docker images, but there are some Docker-ready Linux distributions which include msoffcrypto-tool (see https://repology.org/project/python:msoffcrypto-tool/versions).

it was struggling with handling relative imports

Sorry, I'm aware of that problem and will fix it.
I hope after the fix you will be successful with PyInstaller, but I'm not sure in particular if the cryptography library, on which msoffcrypto-tool depends, can be included in the PyInstaller-packed binaries properly.

FYI, there are some similar tools/libraries available in Java, C++, etc. (see https://github.com/nolze/msoffcrypto-tool#alternatives).

@decnorton
Copy link
Author

Thanks! I'll have a go at putting together a slimmed down Docker image

@nolze
Copy link
Owner

nolze commented Jul 4, 2021

Import problem would be fixed by #63. (not released yet)
Also, I noticed that some relevant work has been done by pyinstaller-hooks-contrib. pyinstaller/pyinstaller-hooks-contrib#139
Feel free to comment on this.

@nolze nolze closed this as completed Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants