-
Notifications
You must be signed in to change notification settings - Fork 86
COMP: Prefer to use find_package(Python3 ) #92
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: patched-v3.6.1-2025-06-13-a2687828e
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,8 +53,8 @@ endif() | |
#----------------------------------------------------------------------------- | ||
# Python libraries | ||
|
||
find_package(PythonLibs REQUIRED) | ||
include_directories("${PYTHON_INCLUDE_DIR}") | ||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED) | ||
include_directories("${Python3_INCLUDE_DIRS}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Instead of using the global include_directories command, link against the Python3 imported target (e.g., Python3::Python) via target_link_libraries. This automatically brings in the correct include paths and libraries, aligning with modern CMake practices. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
add_definitions( | ||
-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK | ||
-DPYTHONQT_SUPPORT_NAME_PROPERTY | ||
|
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.
[nitpick] Consider specifying a minimum Python version (for example,
find_package(Python3 3.8 COMPONENTS Interpreter Development REQUIRED)
) to enforce consistent ABI and feature availability across developer environments.Copilot uses AI. Check for mistakes.