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

setup.py: fix detection of missing Cython

v2: use a list comprehension instead map() (suggested by Thomas Waldmann)
This commit is contained in:
Felix Schwarz 2019-06-04 17:50:00 +02:00
parent 35373b8b93
commit e6426d3386

View file

@ -115,9 +115,8 @@ class Sdist(sdist):
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.')