-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
BUG: fix a bug where calling distutils.build_ext.finalize_options more than once would raise an exception
#5083
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
base: main
Are you sure you want to change the base?
Conversation
cea9987 to
f95a3cb
Compare
f95a3cb to
472d8fb
Compare
| if self.undef: | ||
| self.undef = self.undef.split(',') | ||
|
|
||
| if self.swig_opts is None: |
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.
In case the bug isn't obvious: this if/else fork originally assumed that self.swig_opts could be either None or str, but it immediately binds it to a list, so it fails on the second pass with AttributeError: list has no attribute 'split'.
472d8fb to
b3d1e54
Compare
distutils.build_ext.finalize_options
4005da7 to
6c72bfb
Compare
6c72bfb to
e3857b0
Compare
bb76220 to
6f8cada
Compare
distutils.build_ext.finalize_optionsdistutils.build_ext.finalize_options
…ore than once would raise an exception
6f8cada to
4595b98
Compare
distutils.build_ext.finalize_optionsdistutils.build_ext.finalize_options more than once would raise an exception
|
this evolved into 2 separate bug fixes, so I split the second one out into #5084 |
Summary of changes
This allows
build_ext.finalize_optionsto be called more than once without crashing. This is helpful in h5py and yt where we cannot really finalize options of this class before needing side effects (which live in therunmethod, as recommended).I'm opening as a draft and without a test for now because I'm running out of time but I'll make sure to add one before opening for review.
Pull Request Checklist
newsfragments/.(See documentation for details)