diff --git a/README.asciidoc b/README.asciidoc index a7223f8d..edec0c15 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -21,6 +21,14 @@ Installation Python 3.3+ is required. +Install dependencies +^^^^^^^^^^^^^^^^^^^^ + +clcache uses https://pypi.python.org/pypi/xxhash[xxhash] for file hashing. +Install it via: + + pip install xxhash + Installation via exe ^^^^^^^^^^^^^^^^^^^^ diff --git a/appveyor.yml b/appveyor.yml index f18f19b5..f5402d36 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,6 +42,9 @@ install: - pip install codecov - coverage --version + # Install xxhash python bindings + - pip install xxhash + build_script: - python clcache.py --help - python clcache.py -s diff --git a/clcache.py b/clcache.py index fe117214..666762d2 100644 --- a/clcache.py +++ b/clcache.py @@ -13,7 +13,6 @@ import codecs import contextlib import errno -import hashlib import json import multiprocessing import os @@ -21,11 +20,12 @@ import signal import subprocess import sys +import xxhash from tempfile import TemporaryFile VERSION = "3.3.1-dev" -HashAlgorithm = hashlib.md5 +HashAlgorithm = xxhash.xxh64 # try to use os.scandir or scandir.scandir # fall back to os.listdir if not found @@ -192,7 +192,7 @@ class ManifestRepository(object): # invalidation, such that a manifest that was stored using the old format is not # interpreted using the new format. Instead the old file will not be touched # again due to a new manifest hash and is cleaned away after some time. - MANIFEST_FILE_FORMAT_VERSION = 6 + MANIFEST_FILE_FORMAT_VERSION = 7 def __init__(self, manifestsRootDir): self._manifestsRootDir = manifestsRootDir