From 249de7eb45bcf5129f559bda40447cde9be4a75a Mon Sep 17 00:00:00 2001 From: Manu Date: Wed, 23 Mar 2022 17:19:43 +0400 Subject: [PATCH] Add feedback, part 1 --- setup.cfg | 23 +++++++++++------------ setup.py | 14 +++++++++----- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8b8929fe7..16886a7e2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 = diff --git a/setup.py b/setup.py index e1e48fd12..88cf39ff0 100644 --- a/setup.py +++ b/setup.py @@ -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() )