From 6fab50d51fd76c6ecd9d01b79e63b64dc0f2aa4b Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 27 Dec 2023 21:22:37 +0200 Subject: [PATCH] Black --- setup.py | 62 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/setup.py b/setup.py index 079474c..f538e09 100755 --- a/setup.py +++ b/setup.py @@ -10,58 +10,58 @@ here = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the README file -with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: +with open(os.path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() -define_macros = [('HB_NO_MT', '1'), ('HB_EXPERIMENTAL_API', '1')] +define_macros = [("HB_NO_MT", "1"), ("HB_EXPERIMENTAL_API", "1")] linetrace = False -if int(os.environ.get('CYTHON_LINETRACE', '0')): +if int(os.environ.get("CYTHON_LINETRACE", "0")): linetrace = True - define_macros.append(('CYTHON_TRACE_NOGIL', '1')) + define_macros.append(("CYTHON_TRACE_NOGIL", "1")) extra_compile_args = [] extra_link_args = [] libraries = [] -if platform.system() != 'Windows': - extra_compile_args.append('-std=c++11') - define_macros.append(('HAVE_MMAP', '1')) - define_macros.append(('HAVE_UNISTD_H', '1')) - define_macros.append(('HAVE_SYS_MMAN_H', '1')) +if platform.system() != "Windows": + extra_compile_args.append("-std=c++11") + define_macros.append(("HAVE_MMAP", "1")) + define_macros.append(("HAVE_UNISTD_H", "1")) + define_macros.append(("HAVE_SYS_MMAN_H", "1")) else: - define_macros.append(('HAVE_DIRECTWRITE', '1')) - define_macros.append(('HAVE_UNISCRIBE', '1')) - libraries += ['usp10', 'gdi32', 'user32', 'rpcrt4', 'dwrite'] + define_macros.append(("HAVE_DIRECTWRITE", "1")) + define_macros.append(("HAVE_UNISCRIBE", "1")) + libraries += ["usp10", "gdi32", "user32", "rpcrt4", "dwrite"] -if platform.system() == 'Darwin': - define_macros.append(('HAVE_CORETEXT', '1')) - extra_link_args.extend(['-framework', 'ApplicationServices']) +if platform.system() == "Darwin": + define_macros.append(("HAVE_CORETEXT", "1")) + extra_link_args.extend(["-framework", "ApplicationServices"]) extension = Extension( - 'uharfbuzz._harfbuzz', + "uharfbuzz._harfbuzz", define_macros=define_macros, - include_dirs=['harfbuzz/src'], + include_dirs=["harfbuzz/src"], sources=[ - 'harfbuzz/src/harfbuzz-subset.cc', - 'harfbuzz/src/hb-coretext.cc', - 'harfbuzz/src/hb-directwrite.cc', - 'harfbuzz/src/hb-uniscribe.cc', - 'src/uharfbuzz/_harfbuzz.pyx', + "harfbuzz/src/harfbuzz-subset.cc", + "harfbuzz/src/hb-coretext.cc", + "harfbuzz/src/hb-directwrite.cc", + "harfbuzz/src/hb-uniscribe.cc", + "src/uharfbuzz/_harfbuzz.pyx", ], - language='c++', + language="c++", libraries=libraries, extra_compile_args=extra_compile_args, extra_link_args=extra_link_args, ) extension_test = Extension( - 'uharfbuzz._harfbuzz_test', + "uharfbuzz._harfbuzz_test", define_macros=define_macros, - include_dirs=['harfbuzz/src'], + include_dirs=["harfbuzz/src"], sources=[ - 'src/uharfbuzz/_draw_test_funcs.cc', - 'src/uharfbuzz/_harfbuzz_test.pyx', + "src/uharfbuzz/_draw_test_funcs.cc", + "src/uharfbuzz/_harfbuzz_test.pyx", ], - language='c++', + language="c++", libraries=libraries, extra_compile_args=extra_compile_args, extra_link_args=extra_link_args, @@ -72,7 +72,7 @@ use_scm_version={"write_to": "src/uharfbuzz/_version.py"}, description="Streamlined Cython bindings for the harfbuzz shaping engine", long_description=long_description, - long_description_content_type='text/markdown', + long_description_content_type="text/markdown", author="Adrien Tétar", author_email="adri-from-59@hotmail.fr", url="https://github.com/trufont/uharfbuzz", @@ -82,9 +82,9 @@ zip_safe=False, setup_requires=["setuptools_scm"], python_requires=">=3.5", - ext_modules = cythonize( + ext_modules=cythonize( [extension, extension_test], - annotate=bool(int(os.environ.get('CYTHON_ANNOTATE', '0'))), + annotate=bool(int(os.environ.get("CYTHON_ANNOTATE", "0"))), compiler_directives={"linetrace": linetrace}, ), )