if you do not have python >= 3.7, you can still use borg 1.1.x or 1.0.x.
another option is to use the fat binary from github releases, which
includes python and all other stuff needed.
our data structures need strict_map_key=False, which is not the
default of msgpack 1.0.0. i made it default in our wrapper API.
call our wrapper for performance profile creation/conversion also
to avoid msgpack compat issues.
remove encoding from wrapper api, we do not use it any more.
remove raw is True check, we need false for profiles
strict_map_key is only supported for msgpack >= 1.0.0.
- Created a batch file to build borg on windows
- Adjusted setup.py to be runnable on windows and build the windows
extension
- Extracted the free space check to a function in the platform module
- Created the minimal needed (dummy) functions for the windows platform
module
The build process can be controlled via environment variables
similar to other bundled libraries in borgbackup. The main difference
is probably that upstream does not provide a pkgconfig file for
xxhash.
Therefore borg will probably fail to detect the system-provided
version by default (tested on Fedora, seems like Debian and Ubuntu
do not ship a pkgconfig file either). I kept the pkgconfig lookup
code anyway to keep the code as similar as possible to
"setup_compress.py"/"setup_crypto.py".
Setting BORG_LIBXXHASH_PREFIX=/usr helps borg to detect xxhash
on my system (Fedora). You can force the use of the bundled
version of xxhash by setting BORG_USE_BUNDLED_XXHASH=1.
these are already used internally when the build system can not find
a system library (neither via pkginfo nor BORG_LIBXXX_PREFIX is given)
and then triggers usage of the bundled code via these env vars.
now they are also used to tell right from the beginning "use the
bundled code" and in that case it will not try to locate system libs
and headers.
1. BORG_*_PREFIX is checked (avoids lib detection via pkg-config).
2. pkg-config is tried
3. fallback to bundled C code (or failure in case of OpenSSL)
also:
- simplified code again
- removed (c) headers, nothing left of original code
- removed hardcoded lib search pathes
- to find system libs/headers, one must point these env vars to them:
BORG_OPENSSL_PREFIX
- moved some code from setup.py to setup_*.py
- removed hardcoded lib search pathes
- to find system libs/headers, one must point these env vars to them:
BORG_LIBLZ4_PREFIX, BORG_LIBZSTD_PREFIX, BORG_LIBB2_PREFIX
- moved some code from setup.py to setup_*.py