1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 00:07:38 +00:00

Add feedback, part 1

This commit is contained in:
Manu 2022-03-23 17:19:43 +04:00
parent ec11905f11
commit 249de7eb45
2 changed files with 20 additions and 17 deletions

View file

@ -2,11 +2,10 @@
name = borgbackup
author = The Borg Collective (see AUTHORS file)
description = Deduplicated, encrypted, authenticated and compressed backups
url = https://github.com/borgbase/vorta
url = https://github.com/borgbackup/borg
keywords =
backup
borgbackup
# List of classifiers: https://pypi.org/pypi?%3Aaction=list_classifiers
classifiers =
Development Status :: 4 - Beta
Environment :: Console
@ -24,7 +23,6 @@ classifiers =
Topic :: Security :: Cryptography
Topic :: System :: Archiving :: Backup
platforms = Linux, MacOS X, FreeBSD, OpenBSD, NetBSD
long_description = file: README.rst
license = BSD
license_file = LICENSE
project_urls =
@ -36,9 +34,6 @@ project_urls =
packages = find:
package_dir =
=src
# See also the MANIFEST.in file.
# We want to install all the files in the package directories...
include_package_data = true
python_requires = >=3.9
setup_requires =
setuptools_scm>=1.7
@ -49,6 +44,16 @@ install_requires =
tests_require =
pytest
zip_safe = False
# See also the MANIFEST.in file.
# We want to install all the files in the package directories...
include_package_data = true
# ...except the source files which have been compiled (C extensions):
[options.exclude_package_data]
* =
*.c
*.h
*.pyx
[options.packages.find]
where = src
@ -63,12 +68,6 @@ llfuse = llfuse >= 1.3.8
pyfuse3 = pyfuse3 >= 3.1.1
nofuse =
[options.exclude_package_data]
* =
*.c
*.h
*.pyx
[tool:pytest]
python_files = testsuite/*.py
markers =

View file

@ -116,7 +116,7 @@ def run(self):
# How the build process finds the system libs:
#
# 1. if BORG_LIBXXX_PREFIX is set, it will use headers and libs from there.
# 1. if BORG_{LIBXXX,OPENSSL}_PREFIX is set, it will use headers and libs from there.
# 2. if not and pkg-config can locate the lib, the lib located by
# pkg-config will be used. We use the pkg-config tool via the pkgconfig
# python package, which must be installed before invoking setup.py.
@ -140,12 +140,12 @@ def members_appended(*ds):
print('Warning: can not import pkgconfig python package.')
pc = None
def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version):
def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version, lib_subdir='lib'):
system_prefix = os.environ.get(prefix_env_var)
if system_prefix:
print(f'Detected and preferring {lib_pkg_name} [via {prefix_env_var}]')
return dict(include_dirs=[os.path.join(system_prefix, 'include')],
library_dirs=[os.path.join(system_prefix, 'lib')],
library_dirs=[os.path.join(system_prefix, lib_subdir)],
libraries=[lib_name])
if pc and pc.installed(lib_pkg_name, pc_version):
@ -156,7 +156,10 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version):
crypto_ext_kwargs = members_appended(
dict(sources=[crypto_ll_source, crypto_helpers]),
lib_ext_kwargs(pc, 'BORG_OPENSSL_PREFIX', 'crypto', 'libcrypto', '>=1.1.1'),
if is_win32:
lib_ext_kwargs(pc, 'BORG_OPENSSL_PREFIX', 'libcrypto', 'libcrypto', '>=0', lib_subdir=''),
else:
lib_ext_kwargs(pc, 'BORG_OPENSSL_PREFIX', 'crypto', 'libcrypto', '>=0'),
dict(extra_compile_args=cflags),
)
@ -169,7 +172,7 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version):
checksums_ext_kwargs = members_appended(
dict(sources=[checksums_source]),
lib_ext_kwargs(pc, 'BORG_LIBXXHASH_PREFIX', 'xxhash', 'libxxhash', '>= 0.7.3'),
lib_ext_kwargs(pc, 'BORG_LIBXXHASH_PREFIX', 'xxhash', 'libxxhash', '>= 0.8.1'),
lib_ext_kwargs(pc, 'BORG_LIBDEFLATE_PREFIX', 'deflate', 'libdeflate', '>= 1.5'),
dict(extra_compile_args=cflags),
)
@ -230,4 +233,5 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version):
},
cmdclass=cmdclass,
ext_modules=ext_modules,
long_description=setup_docs.long_desc_from_readme()
)