1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-03 13:45:31 +00:00

fix cythonize crash on macOS/py39, fixes #5599

This commit is contained in:
Thomas Waldmann 2020-12-28 19:56:08 +01:00
parent 5d46395ed0
commit d2fe303967

View file

@ -63,7 +63,7 @@
system_prefix_libxxhash = os.environ.get('BORG_LIBXXHASH_PREFIX') system_prefix_libxxhash = os.environ.get('BORG_LIBXXHASH_PREFIX')
# Number of threads to use for cythonize, not used on windows # Number of threads to use for cythonize, not used on windows
cpu_threads = multiprocessing.cpu_count() if multiprocessing else 1 cpu_threads = multiprocessing.cpu_count() if multiprocessing and multiprocessing.get_start_method() != 'spawn' else None
# Are we building on ReadTheDocs? # Are we building on ReadTheDocs?
on_rtd = os.environ.get('READTHEDOCS') on_rtd = os.environ.get('READTHEDOCS')
@ -236,7 +236,7 @@ def members_appended(*ds):
) )
if not is_win32: if not is_win32:
# compile .pyx extensions to .c in parallel, does not work on windows # compile .pyx extensions to .c in parallel, does not work on windows
cython_opts['nthreads'] = cpu_threads + 1 cython_opts['nthreads'] = cpu_threads
# generate C code from Cython for ALL supported platforms, so we have them in the sdist. # generate C code from Cython for ALL supported platforms, so we have them in the sdist.
# the sdist does not require Cython at install time, so we need all as C. # the sdist does not require Cython at install time, so we need all as C.