-
-
Notifications
You must be signed in to change notification settings - Fork 346
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 building sdist and wheels and conda packages #1232
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We are now downloading 1.78 from jfrog. This has been working up to now because the cache was available.
YamlWriter.to_file() calls the C++ function after stringify-ing the filename. This implicitly assumes that filename is a string. With this change, filename can be either a string or an instance of pathlib.Path.
Tests that write data should do so in the test_work_path to avoid polluting the user's current working directory and to avoid permission errors if the current working directory is write-protected.
Some configuration options conflict with creating the sdist, or else are just unnecessary. These options are checked and set to an appropriate value if they aren't specified. The build now errors if incompatible options are explicitly specified.
The config.h file for Cantera needs to have certain values set on the platform that will build/install Cantera, not the platform building the sdist. These values are now added to the config.h.in template by setup.py. Values that are not platform dependent are still handled by SConscript when the sdist is generated.
Setuptools includes CFLAGS from when Python was built, which may include the flag to add debug symbols. This dramatically inflates the size of our wheels, so this change disables those symbols. We also exclude source files from the built wheel. _cantera.cpp ends up being ~10 MB uncompressed, so this is a signifcant savings as well. Overall, the wheel goes from ~100 MB to ~5 MB.
speth
previously approved these changes
Mar 30, 2022
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.
Looks good to me. I had a couple of questions, but they don't necessarily require any changes.
Eager resolution of the prefix path to an absolute directory caused the entire path to the prefix to be used under the stage_dir. As this breaks the utility of stage_dir, the resolution is conditional on stage_dir not being among the selected options. Resolves build failures of the Conda package for Matlab.
bryanwweber
changed the title
Fix building sdist and wheels
Fix building sdist and wheels and conda packages
Mar 31, 2022
@speth Since I pushed new commits, this needs another green check, then I think it's good to |
speth
approved these changes
Mar 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
pathlib.Path
as the filename forwrite_yaml
scons build
&scons test
) and unit tests address code coverage