From e6426d3386c59a37af601d0d11a92cb90ee864be Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Tue, 4 Jun 2019 17:50:00 +0200 Subject: [PATCH] setup.py: fix detection of missing Cython v2: use a list comprehension instead map() (suggested by Thomas Waldmann) --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index dc5cb248..bf4fd2af 100644 --- a/setup.py +++ b/setup.py @@ -115,9 +115,8 @@ else: def __init__(self, *args, **kwargs): raise Exception('Cython is required to run sdist') - if not on_rtd and not all(os.path.exists(path) for path in [ - compress_source, crypto_ll_source, chunker_source, hashindex_source, item_source, checksums_source, - platform_posix_source, platform_linux_source, platform_freebsd_source, platform_darwin_source]): + cython_c_files = [fn.replace('.pyx', '.c') for fn in cython_sources] + if not on_rtd and not all(os.path.exists(path) for path in cython_c_files): raise ImportError('The GIT version of Borg needs Cython. Install Cython or use a released version.')