-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SCons] Change prefix default if conda is detected #1191
Conversation
63b7d27
to
c4f382d
Compare
Codecov Report
@@ Coverage Diff @@
## main #1191 +/- ##
==========================================
- Coverage 65.45% 65.41% -0.04%
==========================================
Files 318 318
Lines 46106 46085 -21
Branches 19604 19604
==========================================
- Hits 30177 30145 -32
+ Misses 13433 13426 -7
- Partials 2496 2514 +18
Continue to review full report at Codecov.
|
7a2e1fd
to
1698d80
Compare
13ebd52
to
b0cee4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for proposing something here @ischoegl! I have a high level question before reviewing the code in more detail. I wonder if it would be clearer to a user if we added conda
as an allowed default value for some of the options? Or, if that's too intrusive, appended/overwrote some of the default options before the options are all saved to cantera.conf.
This could be used to write things out into the cantera.conf
file, which may prompt people to edit that file to restore old behavior if they want. I think that could also simplify some of the use_conda
logic and checking lines from cantera.conf
. Does that make sense? I'd be happy to throw together a small prototype to clarify.
@bryanwweber ... thank you for the feedback! I limited the conda-specific installation folders to Windows ( |
8f1d589
to
de362a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really shaping up @ischoegl I'm 👍 on the direction in general here. A few comments/questions below
a9c1748
to
fd5fb32
Compare
efcf06f
to
a19de56
Compare
🎉 ... this is for Linux with the following
This is the result of
I am unfortunately not able to test on OSX, but as long as the file structure follows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, one last round of suggestions here, I hope. Now that we've sorted out the set
issue 😄
@bryanwweber ... thanks for the suggestions! I adopted all. I further double-checked that things still work as expected on Windows, and the Linux variant is taken care of by the Sundials runners. Should be good to go! |
What I want is to replicate the exact conda installation paths inside the |
30e90fc
to
4e9c2b9
Compare
That's easy on
|
134b217
to
c735879
Compare
ok. ran a test for
So it does look like the Edit: Python Package is not installed in correct location, but
|
c735879
to
9d9b48b
Compare
@bryanwweber / @speth ... I ran some tests but am not completely following why the logic used for setting ... update ...
Edit: Python is installed in the expected locations, although they are not displayed correctly |
Alright ... mystery solved: on Linux, the On windows, the installation folder for the Python package is
|
9d9b48b
to
79e53d5
Compare
Also, add conda library/include paths (if applicable)
79e53d5
to
b749aa3
Compare
@bryanwweber / @speth ... I just opened #1194 as the issues with the 'stage' location opens a can of worms that goes well beyond the scope of what this PR intended to achieve. I rolled back all the 'fixes' for the post-build message, as I believe that they need to be addressed in another PR with a more narrow scope. In a nutshell:
There are two reasons why I'd like to defer a full resolution: (i) #1158 may change some of the behavior, and (ii) having the That said, I believe the PR is ready with the caveats stated above. |
b749aa3
to
15aa82a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing this, @ischoegl. I think this will simplify from-source installation a lot in one of the most common use scenarios. My suggestions here are mostly around expanding the documentation of this feature.
15aa82a
to
58be58a
Compare
@speth ... thank you for the suggestions - these were all easily adopted. While the @bryanwweber ... unless you have any other suggestions, I believe this is ready to merge! |
Changes proposed in this pull request
The default installation
prefix
is changed only when:prefix
is not set ANDpython_prefix
is not set ANDpython_cmd
is not set AND$CONDA_PREFIX
is set AND$CONDA_PREFIX
Also: add
conda
include/library folders if conda is used (as long asextra_inc_dirs
andextra_lib_dirs
are not set.If applicable, fill in the issue number this pull request is fixing
Closes Cantera/enhancements#76
If applicable, provide an example illustrating new features this pull request is introducing
Checklist
scons build
&scons test
) and unit tests address code coverage