Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledhosny committed Dec 27, 2023
1 parent 7a3b0fa commit 6fab50d
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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="[email protected]",
url="https://github.com/trufont/uharfbuzz",
Expand All @@ -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},
),
)

0 comments on commit 6fab50d

Please sign in to comment.