Skip to content
Snippets Groups Projects
Commit 10728848 authored by Ishan Bhanuka's avatar Ishan Bhanuka
Browse files

Add pyblake2 platform specific dependency

Remove version checking code, pyblake2 is installed by default on python 3.6+
parent b3250d29
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,6 @@
# See top-level LICENSE file for more information
from setuptools import setup, find_packages
import hashlib
from os import path
from io import open
......@@ -36,24 +35,7 @@ def parse_requirements(name=None):
return requirements
blake2_requirements = []
pyblake2_hash_sets = [
# Built-in implementation in Python 3.6+
{'blake2s', 'blake2b'},
# Potentially shipped by OpenSSL 1.1 (e.g. Python 3.5 in Debian stretch
# has these)
{'blake2s256', 'blake2b512'},
]
for pyblake2_hashes in pyblake2_hash_sets:
if not pyblake2_hashes - set(hashlib.algorithms_available):
# The required blake2 hashes have been found
break
else:
# None of the possible sets of blake2 hashes are available.
# use pyblake2 instead
blake2_requirements.append('pyblake2')
blake2_requirements = ['pyblake2;python_version<"3.6"']
setup(
name='swh.model',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment