You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reporting a bug, please provide the following information. If this is not a bug report you can just discard this template.
🌍 Environment
Your operating system and version: Linux, MacOS
Your python version: 3.6, 3.7,3.8
How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: Pyenv and system native (Ubuntu)
Your Rust version (rustc --version): nightly-2020-07-11
Your PyO3 version: 0.11.1, 0.9.2
Have you tried using latest PyO3 master (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?: No
💥 Reproducing
Any PyO3 code should face the same behaviour.
Hello,
Thank you very much for the PyO3 project. This has been a massive game changer in accelerating python based projects. I noticed that PyO3 was triggering recompilation (or rechecking) after every change I made, even if the change was in an unrelated crate.
The source was found out to be rust-analyzer running in the IDE, where, due to many factors, the PATH can be different than in the shell. Under certain other environments, the PATH can be different between two shells as well. (Something like fnm uses PATH to set the node versions, changing the variable). I'm not certain, but IDEs such as VSCode also modify PATH before executing.
All of this makes for a very excruciating development environment, especially in very large projects where PyO3 based code is a relatively static and small part of the codebase. We've resorted to using a forked version with the PATH rechecking disabled, but I thought I should still file the bug since other people may also have the same issue.
I understand the need for checking PATH to trigger recompilation, but I was wondering if there was an alternative for situations where the PATH is expected to change unrelated to the location of the python executable. My build.rs knowlege is a bit lacking, but I was wondering if this would be solved by adding a cargo feature flag or something.
Once again, thank you so much for the time you've put into PyO3.
The text was updated successfully, but these errors were encountered:
We need to use PATH to find the python executable, as you noted. However I think when PYO3_PYTHON is an absolute path to an interpreter, then we don't need to rely on PATH and could ignore changes to it. Would this be acceptable for you? The expectation would be that you set this in all environments where you're compiling code.
If so, I'll add a tweak to build.rs tonight which we can release with pyo3 0.12.2.
🐛 Bug Reports
When reporting a bug, please provide the following information. If this is not a bug report you can just discard this template.
🌍 Environment
3.6
,3.7
,3.8
rustc --version
):nightly-2020-07-11
0.11.1
,0.9.2
version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
: No💥 Reproducing
Any PyO3 code should face the same behaviour.
Hello,
Thank you very much for the PyO3 project. This has been a massive game changer in accelerating python based projects. I noticed that PyO3 was triggering recompilation (or rechecking) after every change I made, even if the change was in an unrelated crate.
The source was found out to be rust-analyzer running in the IDE, where, due to many factors, the
PATH
can be different than in theshell
. Under certain other environments, thePATH
can be different between two shells as well. (Something likefnm
usesPATH
to set the node versions, changing the variable). I'm not certain, but IDEs such as VSCode also modify PATH before executing.All of this makes for a very excruciating development environment, especially in very large projects where PyO3 based code is a relatively static and small part of the codebase. We've resorted to using a forked version with the
PATH
rechecking disabled, but I thought I should still file the bug since other people may also have the same issue.I understand the need for checking
PATH
to trigger recompilation, but I was wondering if there was an alternative for situations where thePATH
is expected to change unrelated to the location of thepython
executable. My build.rs knowlege is a bit lacking, but I was wondering if this would be solved by adding a cargo feature flag or something.Once again, thank you so much for the time you've put into PyO3.
The text was updated successfully, but these errors were encountered: