diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 305eba0f..c1e183f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ jobs: with: submodules: recursive - uses: actions/setup-python@v3 + with: + python-version: 3.10.6 - uses: pre-commit/action@v3.0.0 with: extra_args: --hook-stage manual --all-files diff --git a/.gitmodules b/.gitmodules index c1bb64c7..76f6d66b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,4 +12,4 @@ url = https://github.com/imneme/pcg-cpp.git [submodule "xxhash"] path = xxhash - url = https://github.com/RedSpah/xxhash_cpp.git + url = https://github.com/Cyan4973/xxHash.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 0be16725..679eb6c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ target_include_directories(correctionlib PRIVATE $ $ - $ + $ $ ) target_compile_features(correctionlib PUBLIC cxx_std_17) diff --git a/Makefile b/Makefile index b334f8a3..f91594d0 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ else PYLDFLAG=-Wl,-rpath,'$$ORIGIN/lib' endif OSXFLAG=$(shell uname|grep -q Darwin && echo "-undefined dynamic_lookup") -CFLAGS=--std=c++17 -O3 -Wall -fPIC -Irapidjson/include -Ipybind11/include -Icpp-peglib $(PYINC) -Iinclude +CFLAGS=--std=c++17 -O3 -Wall -fPIC -Irapidjson/include -Ipybind11/include -Icpp-peglib -Ixxhash -Ipcg-cpp/include $(PYINC) -Iinclude PREFIX ?= correctionlib STRVER=$(shell git describe --tags) MAJOR=$(shell git describe --tags|sed -n "s/v\([0-9]\+\)\..*/\1/p") diff --git a/pyproject.toml b/pyproject.toml index c5ea73cf..3f7cf402 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ build-backend = "setuptools.build_meta" write_to = "src/correctionlib/version.py" [tool.cibuildwheel] -skip = ["cp311-*"] +skip = ["pp*-*", "cp311-*"] test-extras = "test" test-command = "python -m pytest {package}/tests" # update skip when numpy wheels become available diff --git a/src/correction.cc b/src/correction.cc index b710aab8..692cd79e 100644 --- a/src/correction.cc +++ b/src/correction.cc @@ -7,7 +7,8 @@ #include #include #include "correction.h" -#include "xxhash.hpp" +#define XXH_INLINE_ALL 1 +#include "xxhash.h" #include "pcg_random.hpp" #if __has_include() #include @@ -288,7 +289,7 @@ double HashPRNG::evaluate(const std::vector& values) const { } else { throw std::logic_error("I should not have ever seen a string"); } } - gen.seed(xxh::xxhash<64>((const void*) seedData, nbytes)); + gen.seed(XXH64((const void*) seedData, nbytes, 0ul)); switch (dist_) { case Distribution::stdflat: return std::uniform_real_distribution<>()(gen); diff --git a/xxhash b/xxhash index 62469667..35b0373c 160000 --- a/xxhash +++ b/xxhash @@ -1 +1 @@ -Subproject commit 62469667b46703e42529358f80a06e58a506d26f +Subproject commit 35b0373c697b5f160d3db26b1cbb45a0d5ba788c