diff --git a/cdatapack/cdatapack_get.c b/cdatapack/cdatapack_get.c --- a/cdatapack/cdatapack_get.c +++ b/cdatapack/cdatapack_get.c @@ -6,11 +6,12 @@ #include #include +#include #include +#include + #include "convert.h" -#include "sha1/sha1.h" #include "cdatapack.h" -#include #define DATAIDX_EXT ".dataidx" #define DATAPACK_EXT ".datapack" diff --git a/cfastmanifest/checksum.c b/cfastmanifest/checksum.c --- a/cfastmanifest/checksum.c +++ b/cfastmanifest/checksum.c @@ -5,7 +5,7 @@ // // no-check-code -#include "sha1/sha1.h" +#include #include "node.h" #include "tree.h" diff --git a/ctreemanifest/manifest.cpp b/ctreemanifest/manifest.cpp --- a/ctreemanifest/manifest.cpp +++ b/ctreemanifest/manifest.cpp @@ -7,7 +7,7 @@ // // no-check-code -#include "sha1/sha1.h" +#include #include "manifest.h" diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -160,16 +160,19 @@ 'datapack': { "sources" : ["cdatapack/cdatapack.c"], "include_dirs" : ["clib"] + include_dirs, - "libraries" : ["lz4", "sha1"], + "libraries" : ["lz4", "sha1detectcoll"], "extra_args" : filter(None, [STDC99, WALL, WERROR, WSTRICTPROTOTYPES] + cflags), }, 'mpatch': { 'sources': ['cstore/mpatch.c'] }, - "sha1": { - "sources" : ["clib/sha1/sha1.c", "clib/sha1/ubc_check.c"], - "include_dirs" : ["clib/sha1"] + include_dirs, + "sha1detectcoll": { + "sources" : [ + "third-party/sha1dc/sha1.c", + "third-party/sha1dc/ubc_check.c", + ], + "include_dirs" : ["third-party"] + include_dirs, "extra_args" : filter(None, [STDC99, WALL, WERROR, WSTRICTPROTOTYPES] + cflags), }, @@ -246,6 +249,7 @@ 'cdatapack', 'clib', 'cstore', + 'third-party', ] + include_dirs, library_dirs=[ 'build/' + distutils_dir_name('lib'), @@ -254,7 +258,7 @@ 'datapack', 'lz4', 'mpatch', - 'sha1', + 'sha1detectcoll', ], extra_compile_args=filter(None, [STDCPP0X, WALL] + cflags), ), @@ -278,9 +282,10 @@ include_dirs=[ 'cfastmanifest', 'clib', + 'third-party', ] + include_dirs, library_dirs=library_dirs, - libraries=['sha1'], + libraries=['sha1detectcoll'], extra_compile_args=filter(None, [ STDC99, WALL, diff --git a/tests/test-check-code-hg.t b/tests/test-check-code-hg.t --- a/tests/test-check-code-hg.t +++ b/tests/test-check-code-hg.t @@ -8,7 +8,7 @@ (The writing "no-che?k-code" is for not skipping this file when checking.) $ hg files "set:grep('Generated by Cython')" > $TESTTMP/cython-generated - $ echo "${LINTFILES:-`hg locate`}" | sed 's-\\-/-g' | grep -v clib/sha1/ > "$TESTTMP/check-files" + $ echo "${LINTFILES:-`hg locate`}" | sed 's-\\-/-g' | grep -v ^third-party/ > "$TESTTMP/check-files" $ cat "$TESTTMP/cython-generated" | while read i; do > grep -F -v "$i" "$TESTTMP/check-files" > "$TESTTMP/check-files-new" > mv "$TESTTMP/check-files-new" "$TESTTMP/check-files" diff --git a/clib/sha1/LICENSE.txt b/third-party/sha1dc/LICENSE.txt rename from clib/sha1/LICENSE.txt rename to third-party/sha1dc/LICENSE.txt diff --git a/clib/sha1/sha1.h b/third-party/sha1dc/sha1.h rename from clib/sha1/sha1.h rename to third-party/sha1dc/sha1.h diff --git a/clib/sha1/sha1.c b/third-party/sha1dc/sha1.c rename from clib/sha1/sha1.c rename to third-party/sha1dc/sha1.c diff --git a/clib/sha1/ubc_check.h b/third-party/sha1dc/ubc_check.h rename from clib/sha1/ubc_check.h rename to third-party/sha1dc/ubc_check.h diff --git a/clib/sha1/ubc_check.c b/third-party/sha1dc/ubc_check.c rename from clib/sha1/ubc_check.c rename to third-party/sha1dc/ubc_check.c