Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,14 @@ def build_extension(self, ext):
defines.append("MONO_OSX")
else:
defines.append("MONO_LINUX")

# Check if --enable-shared was set when Python was built
enable_shared = get_config_var("Py_ENABLE_SHARED")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capital "y" as in PY_ENABLE_SHARED?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if enable_shared == 1:
# Double-check if libpython is linked dynamically with python
lddout = check_output(["ldd", sys.executable])
if 'libpython' not in lddout:
enable_shared = 0
if enable_shared == 0:
defines.append("PYTHON_WITHOUT_ENABLE_SHARED")

Expand Down