Commit Graph

302 Commits

Author SHA1 Message Date
Thomas Waldmann e54b054b2a import setuptools first
there is a warning if one imports distutils before setuptools...
2020-10-05 00:24:52 +02:00
Thomas Waldmann 7dc1610674 selecting least broken llfuse version
1.3.6: works on all supported OSes, but not on py39
1.3.7: does not work on FreeBSD, but with py39
2020-10-05 00:23:40 +02:00
pamaron 8be6afd9e1
Enable Python3.9 env for test suite and VMs (#5373)
for now, skip fuse for py39 -- llfuse does not support py39 yet

use brew update >/dev/null so travis does not complain about too much output
2020-10-04 15:38:05 +02:00
Thomas Waldmann 1a8f5d27ab drop python 3.5, fixes #5344
py35 is EOL.
2020-09-25 02:13:43 +02:00
Thomas Waldmann 1c7d267e1f pypi metadata: we also support python 3.8 now
tested regularly on travis-ci.
2020-04-21 23:14:20 +02:00
Thomas Waldmann da6d1ac538 support msgpack 1.0.0, fixes #5065
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.
2020-04-04 22:04:45 +02:00
Thomas Waldmann d1733b6fc0 require recent enough llfuse for birthtime support, fixes #5064
also:

add llfuse < 2.0 requirement also for python>=3.7.
maybe not really required because llfuse seems rather dead anyway,
but good for consistency.
2020-04-02 20:43:29 +02:00
Thomas Waldmann d32ff32d3a setup.py: add some comments to the cythonize calls 2020-03-08 23:20:11 +01:00
Will 242424ecae Move sync_file_range to its own extension 2020-03-01 00:06:04 -05:00
Björn Ketelaars e2ee7fd24b Support msgpack-0.6.2.
This addresses
https://github.com/borgbackup/borg/issues/4360#issuecomment-541107988
2019-10-15 05:22:20 +02:00
Jürg Rast 6b426d08d7 Initial work to build and run borg under windows
- 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
2019-08-24 10:17:18 +02:00
TW 8c29209195
Merge pull request #4602 from FelixSchwarz/unbundle-xxhash
ability to unbundle xxhash
2019-06-04 23:36:56 +02:00
Felix Schwarz 2ff06c58f0 ability to use a system-provided version of "xxhash"
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.
2019-06-04 21:59:26 +02:00
Felix Schwarz e6426d3386 setup.py: fix detection of missing Cython
v2: use a list comprehension instead map() (suggested by Thomas Waldmann)
2019-06-04 17:50:00 +02:00
Thomas Waldmann 426f3752c1 lib/header locating: add docs, move env vars querying to setup.py 2019-03-15 21:23:46 +01:00
Thomas Waldmann 7b27082a73 setup.py: bundled code vs system libs: use env vars we use anyway
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.
2019-03-15 19:54:33 +01:00
Thomas Waldmann f4e7133a1e setup.py: move long_description generation to setup_docs 2019-03-14 01:33:30 +01:00
Thomas Waldmann 3166d145bb setup.py: add comment, remove unused imports 2019-03-14 00:34:07 +01:00
Thomas Waldmann b516cf3c3f reduce amount of setup_*.py files in toplevel dir 2019-03-14 00:33:56 +01:00
Thomas Waldmann 1579d58b3e cope with pkgconfig ImportError 2019-03-14 00:18:15 +01:00
Thomas Waldmann 528aee3ca6 extension building: first crypto, then compression (cosmetic) 2019-03-13 18:30:15 +01:00
Thomas Waldmann 5173b9f407 add pkg-config support, fixes #1925
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
2019-03-13 18:26:47 +01:00
Thomas Waldmann 80ade7093d simplify code by merging kwargs dicts at caller 2019-03-13 03:01:00 +01:00
Thomas Waldmann 24bf01a40b moved bundled_path to setup_*.py 2019-03-12 03:44:43 +01:00
Thomas Waldmann 7db29017e5 simplify initial dirs/macros setup 2019-03-12 03:32:32 +01:00
Thomas Waldmann 2dfc6bb43f refactor openssl related code in setup.py
- 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
2019-03-12 03:15:59 +01:00
Thomas Waldmann d6635da654 refactor lib/bundled related code in 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
2019-03-12 02:46:00 +01:00
Thomas Waldmann 7b4b42d832 pypi metadata: enter alpha dev status 2019-02-26 22:39:27 +01:00
Thomas Waldmann 2713500983 remove -*- coding: ... lines, utf-8 is default for py3 2019-02-22 17:12:05 +01:00
Thomas Waldmann 940e107add cleanup msgpack requirements
we do not expect 0.5.x with x > 6 any more.

also remove outdated comments from setup.py.
2019-02-05 02:37:22 +01:00
Thomas Waldmann 0ebfaa5b61 allow msgpack 0.6.1, fixes #4308 2019-02-05 02:32:36 +01:00
Thomas Waldmann 18c9feb7e3 check msgpack version, terminate for unsupported versions 2019-02-03 03:54:41 +01:00
Thomas Waldmann a255e91988 cythonize: set language_level to 3, fixes #4214 2018-12-15 18:52:26 +01:00
Thomas Waldmann 07f89d4518 msgpack: also allow version 0.6.0 2018-12-11 01:55:18 +01:00
Thomas Waldmann 2be5446098 Revert "drop support for python 3.5, fixes #3919"
This reverts commit 55314f807e.
2018-12-11 00:53:43 +01:00
Thomas Waldmann 751cd2caed add python 3.7 to pypi metadata 2018-08-06 17:48:27 +02:00
Thomas Waldmann 55314f807e drop support for python 3.5, fixes #3919
if you do not have python 3.6.x, 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 3.6 and all other stuff needed.
2018-06-30 21:02:19 +02:00
Thomas Waldmann 06f2378458 setup.py: move build_man / build_usage code to setup_docs.py
brings setup.py down from 800 to 300 lines.
2018-06-12 21:06:01 +02:00
Thomas Waldmann 39a7078741 modernize / simplify llfuse requirements
DO NOT BACKPORT TO 1.1-maint / 1.0-maint.

master branch will still take a while until next release,
so we can safely require llfuse >= 1.1 (May 2016).
2018-06-12 20:49:23 +02:00
Thomas Waldmann d0bed00e9a remove pyzmq package requirement, not used yet 2018-06-12 20:38:21 +02:00
Thomas Waldmann 715c3d6824 switch to "msgpack" pypi pkg name, fixes #3890
MASTER BRANCH ONLY, DO NOT BACKPORT TO 1.1 or 1.0!

As there are no 0.4.x msgpack releases (under this new name, 0.4.x
used to be named "msgpack-python"), currently only 0.5.6 can be
recommended. See comments for other versions that are acceptable
under certain conditions.

We will add new msgpack versions later, after testing them.
2018-06-12 19:34:40 +02:00
Eli Schwartz b5d22b5fba
Embrace environment markers (a.k.a. PEP 508 compliance)!
Failure to use environment markers means the dependencies are
unconditionally added at build time based on the host instead of being
always present and evaluated at runtime on the target; e.g. wheels have
the wrong information.

Also use python_requires. This teaches pip how to natively comprehend
when the current version of python is not supported by borg.

Returns errors in the format:
borgbackup requires Python '>=3.5' but the running Python is $oldver
2018-06-11 22:29:16 -04:00
Thomas Waldmann ab6e6314dd revert to using system compression libs, fixes #3797
we temporarily used the updated, bundled lz4 and zstd code for testing
purposes, but now going back to using system provided libs by default.

(cherry picked from commit 66084c7234)
2018-06-10 09:49:04 +05:30
Thomas Waldmann 60a5d6e59e temporarily prefer bundled lz4 to test it
(cherry picked from commit bf6fa04650)
2018-06-08 17:03:35 +05:30
Thomas Waldmann 89c7093048 fix package long description, fixes #3854
(cherry picked from commit a318c3bb66)
2018-05-26 23:30:21 +02:00
Thomas Waldmann d2884d3317 temporarily prefer bundled zstd to test it
(cherry picked from commit 6a6ad89f5b)
2018-05-18 22:30:38 +02:00
Thomas Waldmann 2c47b4596f update msgpack requirement, fixes #3753
(cherry picked from commit 5be756a0c6)
2018-05-18 19:30:24 +02:00
Rémi Oudin 318fa2e473 Add a version hint for llfuse for python3.7
Python 3.7 requires llfuse >= 1.3.4.
Fixes https://github.com/borgbackup/borg/issues/3804
2018-05-14 20:22:23 +02:00
Nic Donaldson 83c8734d70 Update setup.py to use a newer Cython/setuptools API for compiling .pyx -> .c (#3788)
update build process to use newer Cython/setuptools APIs

Cython.Distutils.build_ext has been deprecated, and the recommended replacement
is Cython.Build.cythonize.

setuptools.Extension will convert the file extension .pyx -> .c so there's no
need to duplicate the functionality. This allows the removal of the special
Sdist logic when cython is available.

cythonize will compile .pyx -> .c, but the resulting Extension's files won't be
included in sdist unless the Extension is in ext_modules. We don't want the
platform extensions in ext_modules though because that will break compilation,
so the platform .c files were added to the manifest.

- removed some unnecessary distutils imports and moved some imports for better
  visibility

- stop cythonize from running in some common use cases like 'clean'
2018-04-28 18:06:10 +02:00
Thomas Waldmann 9cf8d57f51 do .h file content checks in binary mode, fixes #3544
we can't know the encoding header file authors will use,
so using binary for our simple checks is the safest way.
2018-01-27 19:49:42 +01:00
Thomas Waldmann a71a83c380 require msgpack >= 0.4.6 and < 0.6.0, forbid 0.5.0.
maybe this is the easiest way for us to deal with msgpack compatibility.

0.5.0 release had some troubles:
- FutureWarning on stderr disturbing other output there, breaking tests
- pip install -U broken due to a pip issue with the transisition pkg
  which was needed due to the package rename (ImportError for msgpack)
- some linux dists not packaging the transition pkg
2018-01-10 07:23:57 +01:00
Thomas Waldmann 4a2fec32b6 crypto.low_level extension: build blake2 like zstd, see #3415 2017-12-18 01:06:30 +01:00
Thomas Waldmann fe48caf853 fix lz4 deprecation warning, require lz4 >= 1.7.0 (r129)
as we bundle lz4 1.8.0 now, platform not having a recent liblz4 can
now just use the bundled code.
2017-12-18 00:53:26 +01:00
Thomas Waldmann 9b6924d27f rename BORG_LZ4_PREFIX env var to BORG_LIBLZ4_PREFIX
consistency:
we also have BORG_LIBB2_PREFIX and BORG_LIBZSTD_PREFIX.
2017-12-18 00:53:26 +01:00
Thomas Waldmann 73a70082c2 compress extension: build lz4 like zstd, see #3415 2017-12-18 00:53:26 +01:00
TW e203b8739b
Merge pull request #3411 from ThomasWaldmann/zstd
add zstd compression
2017-12-15 01:55:20 +01:00
Thomas Waldmann 34b92ffdaa support code to build bundled zstd code into the compress extension
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
2017-12-15 00:29:26 +01:00
Thomas Waldmann aec36f64a2 zstd: use own Cython-based binding, remove python-zstandard dep
currently requires an externally available libzstd >= 1.3.0,
no bundled zstd yet.
2017-12-15 00:29:26 +01:00
Thomas Waldmann 11b2311e6e add zstd compression
based on willyvmm's work in PR #3116, but some changes:

- removed any mulithreading changes
- add zstandard in setup.py install_requires
- tests
- fix: minimum compression level is 1 (not 0)
- use 3 for the default compression level
- use ID 03 00 for zstd
- only convert to bytes if we don't have bytes yet
- move zstd code so that code blocks are ordered by ID
- other cosmetic fixes
2017-12-15 00:29:26 +01:00
Thomas Waldmann 1f5b8c9219 fix building the "borg prune" man page, fixes #3398
will fix all ".. highlight:: none" issues (just killing it).

also a slight punctuation fix, so there is a dot at the end of
the prune man page.
2017-12-13 04:33:50 +01:00
Milkey Mouse 897c003588
Don't generate HTML docs page for borgfs (fixes #3404) 2017-12-02 12:52:37 -08:00
Milkey Mouse 559ec0062e
Use name of command for "virtual man page" name
This makes it slightly easier to debug manpage issues without removing
the virtmanpage hack.
2017-11-25 17:06:02 -08:00
Thomas Waldmann feb428b4e0 clean up and simplify packaging
1.1.2 was released with a sdist that included quite some files that
did not belong into the package (I tried nuitka at some time).

This was because the old MANIFEST.in / setup.py included all the stuff
in the package dir.

Now, setuptools_scm is to automatically deal with the INCLUDES and
MANIFEST.in only handles the EXCLUDES, so only committed files get
into the sdist (minus some we do not want).

Also, no .c .h .pyx files will be installed - they are not needed as
they have been compiled into binary files.
2017-11-25 13:48:46 +01:00
Milkey Mouse 17d5c794d3
Generate man page for borgfs (fixes #3216) 2017-11-10 11:25:19 -08:00
Thomas Waldmann bf3f8e5672 implement simple "issue" role for manpage generation, fixes #3075 2017-10-07 04:11:29 +02:00
TW 902581a96c Merge pull request #3090 from ThomasWaldmann/fuse-version-comments
add some comments about recent fuse versions to setup.py
2017-10-06 20:25:41 +02:00
Thomas Waldmann ce956fa0af add some comments about recent fuse versions to setup.py 2017-10-06 20:01:17 +02:00
Thomas Waldmann be9fb349de check for py 3.5 minimum requirement in setup.py
we do not test on 3.4 any more and have dropped support for it.
so we better enforce it in setup.py also.
2017-10-06 19:38:28 +02:00
Thomas Waldmann a5c6a50ebe increase Python minimum requirement to 3.5.0
also:
- drop testing on 3.4
- add some TODO for the docs and vagrant machines
2017-07-29 20:55:04 +02:00
enkore 5abfa0b266 Merge pull request #2887 from enkore/f/mt-1a
multithreading: add pyzmq dep, chunker GIL
2017-07-29 14:36:01 +02:00
Marian Beermann 55e0c43c53 add zeromq dependency 2017-07-29 11:58:01 +02:00
Thomas Waldmann 92080f9572 crypto: add functions missing in openssl 1.0.x 2017-07-27 23:22:31 +02:00
Thomas Waldmann 73e5ac4a2b setup.py: fix same loop variables
lgtm:
Nested loops in which the target variable is the same for each loop make
the behavior of the loops difficult to understand.

(not really here, just wanted to get rid of lgtm warning)
2017-07-22 02:03:42 +02:00
enkore 12fd244801 Merge pull request #2748 from enkore/f/cleanup-argparse2
archiver: more argparse cleanup, redundant options, missing metavars
2017-06-27 10:05:21 +02:00
Marian Beermann 12bcccc0d6 docs: html: include group description in output 2017-06-26 23:10:12 +02:00
Thomas Waldmann 8aba5772b5 include attic.tar.gz when installing the package 2017-06-26 22:23:02 +02:00
Marian Beermann 88ae1ebf33 docs: format metavars more accurately 2017-06-21 00:13:33 +02:00
Marian Beermann a9059a64bd docs: use DOM ready event, not document loaded event 2017-06-20 15:48:30 +02:00
Marian Beermann 9d33ff1720 docs: skip empty option groups 2017-06-20 15:30:20 +02:00
Marian Beermann e76fae0545 docs: uniform tables for listing options (HTML only) 2017-06-20 15:23:52 +02:00
Marian Beermann a1a92bf00f docs: less space waste following "Common options" 2017-06-20 11:53:36 +02:00
Marian Beermann 6290b73863 docs: more compact options formatting 2017-06-20 11:48:46 +02:00
Marian Beermann 48e815883f docs: usage: fix unintended block quota in common options 2017-06-18 02:07:37 +02:00
enkore d06ee5648c Merge pull request #2572 from enkore/f/fastcachesync
Improve cache sync speed
2017-06-10 17:12:51 +02:00
Marian Beermann 3f8a0221ee Revert "move chunker to borg.algorithms"
This reverts commit 956b50b29c.

# Conflicts:
#	setup.py
#	src/borg/archive.py
#	src/borg/helpers.py
2017-06-07 23:51:42 +02:00
Marian Beermann 0d6064e7f3 docs: fix build_man for relocated examples 2017-06-07 16:29:37 +02:00
Marian Beermann 13adc80cde docs: usage: avoid bash highlight, [options] instead of <options> 2017-06-07 00:44:53 +02:00
Marian Beermann 8fb7db71bc docs: split usage 2017-06-07 00:38:48 +02:00
Marian Beermann c786a5941e CacheSynchronizer: redo as quasi FSM on top of unpack.h
This is a (relatively) simple state machine running in the
data callbacks invoked by the msgpack unpacking stack machine
(the same machine is used in msgpack-c and msgpack-python,
changes are minor and cosmetic, e.g. removal of msgpack_unpack_object,
removal of the C++ template thus porting to C and so on).

Compared to the previous solution this has multiple advantages
- msgpack-c dependency is removed
- this approach is faster and requires fewer and smaller
  memory allocations

Testability of the two solutions does not differ in my
professional opinion(tm).

Two other changes were rolled up; _hashindex.c can be compiled
without Python.h again (handy for fuzzing and testing);
a "small" bug in the cache sync was fixed which allocated too
large archive indices, leading to excessive archive.chunks.d
disk usage (that actually gave me an idea).
2017-06-02 17:43:15 +02:00
Marian Beermann 740898d83b CacheSynchronizer 2017-06-02 17:43:14 +02:00
Marian Beermann 6c91a750d1 algorithms: rename crc32 to checksums 2017-06-01 21:26:42 +02:00
Marian Beermann 0a295dd753 setup.py clean to remove compiled files 2017-05-25 17:58:57 +02:00
enkore 226d1f6094 Revert "docs: borg_domain for custom priority index entries" 2017-05-22 20:45:29 +02:00
Marian Beermann 7284413e3f docs: borg_domain for custom priority index entries 2017-05-22 20:08:11 +02:00
Marian Beermann d5edb011f0 support common options 2017-05-14 18:45:20 +02:00
Marian Beermann c99de523ea remove duplicated setup.py line 2017-05-05 14:42:41 +02:00
Marian Beermann a976e11a63 create crypto package with key, keymanager, low_level 2017-05-02 20:49:27 +02:00
Marian Beermann 956b50b29c move chunker to borg.algorithms 2017-05-02 19:15:01 +02:00
Marian Beermann fa381ffcbe create package borg.algorithms with borg.algorithms.crc32 module 2017-05-02 18:53:54 +02:00
Marian Beermann 475d53d9ef docs: kill api page 2017-03-25 15:41:11 +01:00