Skip to content
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

Fix windows and cantera-matlab builds #34

Merged
merged 3 commits into from
Aug 11, 2022
Merged

Fix windows and cantera-matlab builds #34

merged 3 commits into from
Aug 11, 2022

Conversation

ischoegl
Copy link
Member

@ischoegl ischoegl commented Aug 10, 2022

While #33 fixes conda packages on macOS and linux, the windows build still fails for cantera, while all builds fail for cantera-matlab.

Fixes #20

Some paths require updates based on the SCons option layout=conda going back to Cantera/cantera#1191, which is not completely consistent with choices in conda-recipes.

Among others, the MATLAB toolbox is installed in share/cantera/lib (all platforms), which is different from lib/cantera/matlab (macOS/Linux) and Library\lib\cantera\matlab (win). I am suggesting to keep conda-recipes consistent with layout=conda (as matlab is not a Unix-style library). As paths are automatically set with startup.m, this change is likely inconsequential for end users.

Fwiw, the current layout=conda configuration looks as follows on Windows:

*************** Cantera 3.0.0a2 has been successfully installed ****************

File locations:

  library files               C:\Users\ischo\miniconda3\envs\cantera-dev\Library\lib
  C++ headers                 C:\Users\ischo\miniconda3\envs\cantera-dev\Library\include
  samples                     C:/Users/ischo/miniconda3/envs/cantera-dev\share\cantera\samples
  data files                  C:/Users/ischo/miniconda3/envs/cantera-dev\share\cantera\data
  input file converters       C:\Users\ischo\miniconda3\envs\cantera-dev\Scripts
  Python package              C:\Users\ischo\miniconda3\envs\cantera-dev\Lib\site-packages
  Python examples             C:/Users/ischo/miniconda3/envs/cantera-dev\share\cantera\samples\python
  Matlab toolbox              C:/Users/ischo/miniconda3/envs/cantera-dev\share\cantera\matlab\toolbox
  Matlab samples              C:/Users/ischo/miniconda3/envs/cantera-dev\share\cantera\samples\matlab

An m-file to set the correct matlab path for Cantera is at:

  C:/Users/ischo/miniconda3/envs/cantera-dev\share\cantera\matlab\toolbox\ctpath.m


********************************************************************************

@ischoegl ischoegl force-pushed the fix-20 branch 2 times, most recently from ebbf680 to 50feb42 Compare August 10, 2022 03:59
@ischoegl ischoegl changed the title Fix windows build Fix windows and cantera-matlab builds Aug 10, 2022
@ischoegl ischoegl force-pushed the fix-20 branch 4 times, most recently from f4cf1c9 to 1309bad Compare August 10, 2022 18:27
@ischoegl
Copy link
Member Author

ischoegl commented Aug 10, 2022

@bryanwweber / @speth ... I believe all packages are now fixed for the current main branch on Cantera/cantera - I checked that things import correctly (macOS / Win10 / Fedora), and it looks good. Didn't check MATLAB on Linux, but I don't see why it wouldn't work (I did check on Win10 and macOS).

As an aside, #20 is finally fixed! 😅 … which should make Cantera/cantera-website#180 much simpler.

@ischoegl ischoegl requested a review from a team August 10, 2022 19:48
Copy link
Member

@bryanwweber bryanwweber left a comment

Choose a reason for hiding this comment

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

Thanks again for taking this on! One minor thing

cantera/build_py.bat Outdated Show resolved Hide resolved
@ischoegl
Copy link
Member Author

ischoegl commented Aug 10, 2022

@bryanwweber ... thank you for the review! If you're ok with the fixes, please merge (without squashing?). The next CI job can presumably upload to conda? I don't think replacing ESC_PREFIX by PREFIX changes anything ...

@bryanwweber
Copy link
Member

please merge (without squashing?)

Any reason to avoid squash merge?

@ischoegl
Copy link
Member Author

ischoegl commented Aug 11, 2022

please merge (without squashing?)

Any reason to avoid squash merge?

In #33, the MKL "fix" could have easily been reverted by providing the commit hash e8aa1be, i.e.

$ git revert e8aa1be885fcf07bbd9adee7b500d12e73a7a87a

(I don't think that this is possible after a squash merge, although I may be mistaken).

@bryanwweber
Copy link
Member

In #33, the MKL "fix" could have easily been reverted by providing the commit hash e8aa1be

Ah, fair enough... so it's a one-off thing rather than a philosophical objection. Ah well, it wasn't an extensive change anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libcantera-devel fails on Windows
2 participants