Uh oh!
There was an error while loading. Please reload this page.
Detect whether we are running in a Conda environment and adjust get_include() - #1877
Conversation
| # Are we running in a virtual environment? | ||
| virtualenv = hasattr(sys, 'real_prefix') or \ | ||
| sys.prefix != getattr(sys, "base_prefix", sys.prefix) | ||
There was a problem hiding this comment.
the PEP8 check fails since this empty line contains whitespaces
wjakob
commented
Aug 18, 2019
Hi @sdebionne, @ax3l, this looks reasonable -- do you want me to merge it, or should I wait until it is proven to work in an actual CI build (as suggested by @ax3l here: conda-forge/pybind11-feedstock#32 (comment)) Thanks, |
ax3l
commented
Aug 19, 2019
I added the current PR's changeset to the conda-forge feedstock now. |
| # Are we running in a conda environment? | ||
| conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta')) | ||
| if virtualenv: |
There was a problem hiding this comment.
@sdebionne maybe that's a stupid question but let me ask it anyway:
can one be inside conda and therein as well within a virtualenv? Not that I would do that... conda has its one environments. But if so, how to handle this gracefully (or does this already work)? Or shall we just not support such a constellation?
(The opposite case is not possible, I guess.)
ax3l
commented
Aug 19, 2019
As the tests turned out, the @wjakob ready for merge :) |
wjakob
commented
Aug 19, 2019
Okay, merged then. |
wjakob
commented
Aug 19, 2019
btw: I assume that you'll want this PR to be included in the next patch release 2.3.1, right? |
ax3l
commented
Aug 19, 2019
Yes, please :) |
Try to address this issue with the conda-forge feedstock.
For the records, Conda packages install headers in
prefix/includeon Linux andprefix\Library\includeon Windows.