mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-23 00:07:38 +00:00
cythonize: set language_level to 3, fixes #4214
This commit is contained in:
parent
e05866074d
commit
a255e91988
1 changed files with 9 additions and 3 deletions
12
setup.py
12
setup.py
|
@ -248,9 +248,15 @@ def run(self):
|
||||||
and '--help' not in sys.argv[1:]
|
and '--help' not in sys.argv[1:]
|
||||||
|
|
||||||
if cythonize and cythonizing:
|
if cythonize and cythonizing:
|
||||||
# compile .pyx extensions to .c in parallel
|
cython_opts = dict(
|
||||||
cythonize([posix_ext, linux_ext, freebsd_ext, darwin_ext], nthreads=cpu_threads+1)
|
# compile .pyx extensions to .c in parallel
|
||||||
ext_modules = cythonize(ext_modules, nthreads=cpu_threads+1)
|
nthreads=cpu_threads + 1,
|
||||||
|
# default language_level will be '3str' starting from Cython 3.0.0,
|
||||||
|
# but old cython versions (< 0.29) do not know that, thus we use 3 for now.
|
||||||
|
compiler_directives={'language_level': 3},
|
||||||
|
)
|
||||||
|
cythonize([posix_ext, linux_ext, freebsd_ext, darwin_ext], **cython_opts)
|
||||||
|
ext_modules = cythonize(ext_modules, **cython_opts)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='borgbackup',
|
name='borgbackup',
|
||||||
|
|
Loading…
Reference in a new issue