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

Remove support for (undocumented) --compiler argument #36

Merged
merged 5 commits into from
Nov 11, 2021

Conversation

astrofrog
Copy link
Member

Before this PR, we allowed the compiler returned by get_compiler to be overridden by the --compiler command-line argument. This wasn't actually documented and removing support for this allows us to clean up quite a bit of code.

Needs to be rebased once #34 is merged!

@codecov
Copy link

codecov bot commented Nov 11, 2021

Codecov Report

Merging #36 (d0cd5ac) into master (653bbc5) will increase coverage by 6.87%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   74.16%   81.04%   +6.87%     
==========================================
  Files          10        4       -6     
  Lines         511      269     -242     
==========================================
- Hits          379      218     -161     
+ Misses        132       51      -81     
Impacted Files Coverage Δ
extension_helpers/__init__.py 100.00% <100.00%> (ø)
extension_helpers/_openmp_helpers.py 88.03% <100.00%> (ø)
extension_helpers/_setup_helpers.py 66.32% <100.00%> (ø)
extension_helpers/_utils.py 92.00% <100.00%> (+28.98%) ⬆️
extension_helpers/tests/test_setup_helpers.py
extension_helpers/tests/test_openmp_helpers.py
extension_helpers/tests/__init__.py
extension_helpers/conftest.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 653bbc5...d0cd5ac. Read the comment docs.

Comment on lines 24 to 37
def get_compiler():
"""
Determines the compiler that will be used to build extension modules.

Returns
-------
compiler : str
The compiler option specified for the build, build_ext, or build_clib
command; or the default compiler for the platform if none was
specified.

"""
return new_compiler().compiler_type

Copy link
Member

Choose a reason for hiding this comment

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

If this is the upshot of this change then +:100: because it will make #33 a lot easier.

Copy link
Member Author

@astrofrog astrofrog Nov 11, 2021

Choose a reason for hiding this comment

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

I mean at some point we can even deprecate get_compiler but no rush for that - given how simple it is

Copy link
Member

Choose a reason for hiding this comment

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

We would need to provide a way to switch on compiler / platform though as different compilers can use different flags etc.

@astrofrog astrofrog force-pushed the remove-compiler-argument branch from eaa29a6 to 8d53a34 Compare November 11, 2021 15:25
Copy link
Member

@Cadair Cadair left a comment

Choose a reason for hiding this comment

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

All praise the holy fire of technical debt removal. 🔥

@Cadair Cadair merged commit 46f6c46 into astropy:master Nov 11, 2021
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.

2 participants