FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Work around a broken shared detection on some platforms by den-run-ai · Pull Request #300 · pythonnet/pythonnet · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .yml  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 0 additions & 1 deletion .travis.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sudo: required
language: python
python:
- 2.6
- 2.7
- 3.2
- 3.4
Expand Down
10 changes: 8 additions & 2 deletions setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from distutils.spawn import find_executable
from distutils import log
from platform import architecture
from subprocess import Popen, CalledProcessError, PIPE, check_call
from subprocess import Popen, CalledProcessError, PIPE, check_call, check_output

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@denfromufa Did you try using _check_output instead?

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No, but what is the difference?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's the exact same thing 😄. Atleast it sounds like _check_output was copied from py27 so that earlier version (py26) could use it. I'm reviewing the changes we can make after dropping old python versions and noticed your code.

from glob import glob
import fnmatch
import sys
Expand Down Expand Up @@ -153,7 +153,13 @@ def build_extension(self, ext):

# 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

if not enable_shared:
defines.append("PYTHON_WITHOUT_ENABLE_SHARED")

if hasattr(sys, "abiflags"):
Expand Down

Back | FazBrowse Home | New Git URL