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

Support Algos plugins & pluginize sha3/pyblake3 to allow running on Windows. #9

Merged
merged 2 commits into from
Aug 15, 2016

Conversation

ankostis
Copy link
Collaborator

@ankostis ankostis commented Aug 12, 2016

I wanted to use the nice project also on Windows a live example when giving presentations about signing etc.
But I didn't manage to find sha3 or pyblake2 "native" libraries pre-compiled (searched in Gohlke's famous site, Anaconda, WinPython).
So I converted these dependencies into setuptools plugin mechanism.

Now in linux you have to install it with:

pip install omnihash[*]

while under Windows:

pip install omnihash

NOTE: to run tests, the project may have to be installed in "develop" mode:

pip uninstall omnihash -y; pip install -e .

+ readme: Update sample output.

NOTE: to run tests, the project has to be installed in "develop" mode:

    pip uninstall omnihash -y; pip install -e .
@Miserlou
Copy link
Owner

An alternative to this to seriously consider is simply using pure python hash algorithms. This would actually enable more algos, because https://pypi.python.org/pypi/pysha3 looks like it's a great implementation with more algos that the one I used originally. Also https://github.com/buggywhip/blake2_py

The flips side is that there would be an obvious performance hit though.

@ankostis
Copy link
Collaborator Author

That would be even better.
Supporting swapable implementations of algorithms is exactly what this small PR is for.
And then, having a "filtering" mechanism for selecting which algos to print becomes even more urgent (#10).

@Miserlou
Copy link
Owner

Is there anyway to have the default be to include all of the available plugins so nix users don't have to include the [*]?

@ankostis
Copy link
Collaborator Author

ankostis commented Aug 12, 2016

Is there anyway to have the default be to include all of the available plugins so nix users don't have to include the [*]?

Not any that I know of, sorry :-(

At least the tool provides the python-platform,'s algos out-of-the-box; and if more algos implemented (#4, #1, bitcoin(?)) then using plugins would be part of the mentality of the users.

I have intentionally left CRCs without plugins, although they are a different library.
You may try to pluginize them yourself, just to get the feeling of effort required.
It is 3 to 5 lines LoC to modify, setuptools fo a really good job for ganlding plugins and their dependencies.

@Miserlou Miserlou merged commit 5570c64 into Miserlou:master Aug 15, 2016
@ankostis ankostis deleted the pluginize branch November 22, 2016 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants