Skip to content

Commit

Permalink
anaconda: fix for building in a virtualenv
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Nov 19, 2020
1 parent d3f993a commit a0490a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- Fix missing field in `PyCodeObject` struct (`co_posonlyargcount`) - caused invalid access to other fields in Python >3.7. [#1260](https://github.com/PyO3/pyo3/pull/1260)
- Fix building for `x86_64-unknown-linux-musl` target from `x86_65-unknown-linux-gnu` host. [#1267](https://github.com/PyO3/pyo3/pull/1267)
- Fix building with Anaconda python inside a virtualenv. [#1290](https://github.com/PyO3/pyo3/pull/1290)

## [0.12.3] - 2020-10-12
### Fixed
Expand Down
9 changes: 2 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,7 @@ PYPY = platform.python_implementation() == "PyPy"
# Anaconda based python distributions have a static python executable, but include
# the shared library. Use the shared library for embedding to avoid rust trying to
# LTO the static library (and failing with newer gcc's, because it is old).
ANACONDA = os.path.exists(os.path.join(sys.prefix, 'conda-meta'))
try:
base_prefix = sys.base_prefix
except AttributeError:
base_prefix = sys.exec_prefix
ANACONDA = os.path.exists(os.path.join(sys.base_prefix, 'conda-meta'))
libdir = sysconfig.get_config_var('LIBDIR')
Expand All @@ -728,7 +723,7 @@ print("implementation", platform.python_implementation())
if libdir is not None:
print("libdir", libdir)
print("ld_version", sysconfig.get_config_var('LDVERSION') or sysconfig.get_config_var('py_version_short'))
print("base_prefix", base_prefix)
print("base_prefix", sys.base_prefix)
print("shared", PYPY or ANACONDA or bool(sysconfig.get_config_var('Py_ENABLE_SHARED')))
print("executable", sys.executable)
print("calcsize_pointer", struct.calcsize("P"))
Expand Down

0 comments on commit a0490a6

Please sign in to comment.