Skip to content

Commit

Permalink
Specify linker flags to resolve issue with PyPy and latest distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Aug 22, 2024
1 parent 5a2327a commit 33b97bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ console/
# Virtual environments
venv
p3*/
pypy*/

# Installer logs
pip-log.txt
Expand Down
5 changes: 5 additions & 0 deletions src/islenska/bin_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

from typing import cast, Any

import os
import platform
import cffi # type: ignore

Expand Down Expand Up @@ -72,6 +73,10 @@
if MACOS:
extra_link_args = ["-stdlib=libc++", "-mmacosx-version-min=10.9"]

# On some systems, the linker needs to be told to use the C++ compiler
# due to changes in the default behaviour of distutils
os.environ["LDCXXSHARED"] = "c++ -shared"

ffibuilder.cdef(declarations) # type: ignore

ffibuilder.set_source( # type: ignore
Expand Down

0 comments on commit 33b97bb

Please sign in to comment.