cosmetic: blacken setup.py

This commit is contained in:
Thomas Waldmann 2024-05-12 15:31:35 +02:00
parent 8a73344352
commit ce2a824ec9
No known key found for this signature in database
GPG Key ID: 243ACFA951F78E01

View File

@ -16,6 +16,7 @@
try: try:
from Cython.Build import cythonize from Cython.Build import cythonize
cythonize_import_error_msg = None cythonize_import_error_msg = None
except ImportError as exc: except ImportError as exc:
# either there is no Cython installed or there is some issue with it. # either there is no Cython installed or there is some issue with it.
@ -85,9 +86,12 @@ def __init__(self, *args, **kwargs):
cython_c_files = [fn.replace(".pyx", ".c") for fn in cython_sources] 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): 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 a working Cython. " + raise ImportError(
"Install or fix Cython or use a released borg version. " + "The GIT version of Borg needs a working Cython. "
"Importing cythonize failed with: " + cythonize_import_error_msg) + "Install or fix Cython or use a released borg version. "
+ "Importing cythonize failed with: "
+ cythonize_import_error_msg
)
cmdclass = {"build_ext": build_ext, "sdist": Sdist} cmdclass = {"build_ext": build_ext, "sdist": Sdist}