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(setup): support overriding CMake args #3577

Merged
merged 3 commits into from
Jan 31, 2022
Merged

fix(setup): support overriding CMake args #3577

merged 3 commits into from
Jan 31, 2022

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Dec 28, 2021

Description

Supports setting CMAKE_ARGS to control the CMake file generation. Needed for conda-forge, which does not find the compiler otherwise.

See conda-forge/pybind11-feedstock#74.

Suggested changelog entry:

* Allow CMAKE_ARGS to override CMake args in pybind11's own setup.py.

@henryiii henryiii marked this pull request as draft December 28, 2021 19:49
Copy link
Collaborator

@Skylion007 Skylion007 left a comment

Choose a reason for hiding this comment

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

We do this for Habitat-Sim as well. Surprised this issue wasn't already brought up and fixed.

@henryiii
Copy link
Collaborator Author

(On hold until I work out the actual problem with conda-forge - I think they are going 2017 -> 2019 and the transition is broken). If the original code works after this is sorted, I'd be up in the air about putting this in - we might want the ability to override the CMake command, so I think I'd still be in favor of it.

@henryiii
Copy link
Collaborator Author

Surprised this issue wasn't already brought up and fixed.

Building from true source is very rare - honestly, I probably could move conda-forge over to using the SDist, and not bother with the build from git source. However, I think the reason I don't do that is then I'd have two source files and it would be harder to automate the maintenance.

@henryiii
Copy link
Collaborator Author

This sort of patch is not needed to support conda-forge (see conda-forge/pybind11-feedstock#75). It might still be a good idea, though?

setup.py Outdated Show resolved Hide resolved
@henryiii henryiii changed the title fix: support conda-forge fix(setup): support overriding CMake args Jan 31, 2022
@henryiii henryiii marked this pull request as ready for review January 31, 2022 16:29
@henryiii henryiii merged commit bf7e5f9 into master Jan 31, 2022
@henryiii henryiii deleted the henryiii-patch-3 branch January 31, 2022 16:38
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Jan 31, 2022
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Feb 2, 2022
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