Skip to content

Commit

Permalink
setup.py: add libraries to fix compile of ctypes on MINGW
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen521kk authored and lazka committed Jul 19, 2023
1 parent a6641c6 commit c9ed19b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,11 +1417,12 @@ def detect_ctypes(self):
include_dirs=include_dirs,
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
libraries=[],
libraries=(['ole32', 'oleaut32', 'uuid'] if MS_WINDOWS else []),
sources=sources)
self.add(ext)
# function my_sqrt() needs libm for sqrt()
self.addext(Extension('_ctypes_test', ['_ctypes/_ctypes_test.c']))
self.addext(Extension('_ctypes_test', ['_ctypes/_ctypes_test.c'],
libraries=(['oleaut32'] if MS_WINDOWS else [])))

ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
ffi_lib = None
Expand Down

0 comments on commit c9ed19b

Please sign in to comment.