in master branch, it was possible to do this via setup.py's
cythonize() calls, but we do not have them in 1.1.
thus, i modified the source files, setting the language level to 3,
which is supported since long in Cython (3str is only supported since
recently so might fail with older Cython versions).
Before this changeset, current Cython 0.29.x emitted a FutureWarning,
but still compiled. The next major release of Cython is said to emit
an error instead, so this changeset hopefully avoids the build breaking
after a Cython upgrade.
setup_zstd.py modified so it is just amending the Extension() kwargs,
but the Extension is initialized by the caller.
this way, amending can happend multiple times (e.g. for multiple
compression algorithms).
also:
- move include/library dirs processing for system-library case
- move system zstd prefix detection to setup_zstd module
- cosmetic: setup.py whitespace fixes
- prefer system zstd option, document zstd min. requirement
(cherry picked from commit 34b92ffdaa)
setup.py excludes all .c .h .pyx files from installation, but such
docs / license files would still be copied to the target directory
if they are inside the python "borg" package dir.
fixing only the (generic) slice-by-8 crc32 implementation,
it is assumed that CPUs supporting CLMUL can also efficiently
and correctly deal with unaligned accesses.
slice-by-8 is used e.g. on ARM cpus and they might not (efficiently)
support unaligned memory access, leading to bus errors or low
performance.
(cherry picked from commit f9cd6f7512)