8000 Merge branch 'master' into fix/develop/296-convert-PyObject · pythonnet/pythonnet@9033894 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9033894

Browse files
authored
Merge branch 'master' into fix/develop/296-convert-PyObject
2 parents 335cd37 + 66d755f commit 9033894

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
sudo: required
22
language: python
33
python:
4-
- 2.6
54
- 2.7
65
- 3.2
76
- 3.4

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from distutils.spawn import find_executable
1111
from distutils import log
1212
from platform import architecture
13-
from subprocess import Popen, CalledProcessError, PIPE, check_call
13+
from subprocess import Popen, CalledProcessError, PIPE, check_call, check_output
1414
from glob import glob
1515
import fnmatch
1616
import sys
@@ -153,7 +153,13 @@ def build_extension(self, ext):
153153

154154
# Check if --enable-shared was set when Python was built
155155
enable_shared = get_config_var("Py_ENABLE_SHARED")
156-
if enable_shared == 0:
156+
if enable_shared:
157+
# Double-check if libpython is linked dynamically with python
158+
lddout = check_output(["ldd", sys.executable])
159+
if b'libpython' not in lddout:
160+
enable_shared = False
161+
162+
if not enable_shared:
157163
defines.append("PYTHON_WITHOUT_ENABLE_SHARED")
158164

159165
if hasattr(sys, "abiflags"):

0 commit comments

Comments
 (0)
0