Open lxp opened 5 years ago
How are external dependencies handled by this project? Right now, there do not appear to be any. Would a new one be acceptable?
Currently, there is no mechanism to manage external dependencies. However, there is also no hard-dependency yet, as most functionality works fine with just the Python standard library. You can find the optional dependencies in the README: https://github.com/cfv-project/cfv/blob/master/README.md#optional These functions simply do not work or use some other implementations, when they are not available.
One option would be to use setuptools for dependencies, as it is already used anyway. However, I am not sure, if it is easy to specify optional dependencies. What other options are there to manage dependencies in Python?
What other options are there to manage dependencies in Python?
We could add a requirements.txt
file whose contents gets installed by pip.
We could add a
requirements.txt
file whose contents gets installed by pip.
The project is also distributed via PyPI, so the dependencies should be automatically pulled when doing a pip install cfv
. Does this work, when we just have a requirements.txt
?
You have to put them in setup.py
as well iirc.
If you are not opposed to having a dependency, I will give it a shot.
As an alternative, there would be a pure-python blake2b implementation, but that is of course not competitive performance-wise.
I am not against adding dependencies, especially, if there are some good libraries for the job.
Also, performance is a relevant factor for cfv
.
Please keep in mind that the library should be available via PyPI, run on Python 2.7/3 and there are bonus points, if it is already available as a Debian package, as we want to have a cfv
Debian package again in the future too.
Since Python 3.6 hashlib suports BLAKE2 [1]. If the hashlib support is enough for supporting GNU coreutils b2sum, then I would opt for using it.
In any case, please consider implementing it in cfv 3.x (currently the python3 branch), as no feature releases are planned for cfv 2.x (currently the master branch).
Implemented in GNU coreutils with this commit: https://github.com/coreutils/coreutils/commit/ea94589e9ef02624a3837f97f80efd7d3dcf56bf