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

Python build fixes #372

Merged
merged 2 commits into from
May 29, 2024
Merged

Conversation

airlied
Copy link
Contributor

@airlied airlied commented Apr 30, 2024

These are just a couple of fixes I found while trying to build with OS installs of some pieces.

The macros were all named wrong, but also they use fmt::format
without including the fmt header.

Signed-off-by: Dave Airlie <airlied@redhat.com>
If not using the built-in one, don't install the headers

Signed-off-by: Dave Airlie <airlied@redhat.com>
@@ -25,6 +25,7 @@ static const char* KOMPUTE_LOG_TAG = "KomputeLog";
#else
#if KOMPUTE_BUILD_PYTHON
#include <pybind11/pybind11.h>
#include <fmt/core.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

You could also do:

#if KOMPUTE_BUILD_PYTHON
#include <pybind11/pybind11.h>
namespace py = pybind11;
// from python/src/main.cpp
extern py::object kp_trace, kp_debug, kp_info, kp_warning, kp_error;
#endif // KOMPUTE_BUILD_PYTHON
#include <fmt/core.h>
#endif // VK_USE_PLATFORM_ANDROID_KHR

As in the code in the PR you have #include <fmt/core.h> in the #if and the #else.

@robquill
Copy link
Contributor

I agree that this change is required (and works) to fix the Python build. Hopefully someone can merge this.

@axsaucedo
Copy link
Member

Thank you for following up - yes this LGTM, running tests so we can merge.

Copy link
Member

@axsaucedo axsaucedo left a comment

Choose a reason for hiding this comment

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

LGTM

@axsaucedo axsaucedo merged commit 937880e into KomputeProject:master May 29, 2024
8 checks passed
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.

3 participants