From 1d278d1112d65d4e2d1b6346d6f704e0d4876bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 24 Jul 2020 17:22:36 +0200 Subject: [PATCH] python: rename all Python.h headers to PythonBindings.h. It conveys clearer what those headers are for and avoids issues where shitty IDE indexers (Eclipse?) confuse this with Python's Python.h. --- src/Corrade/CMakeLists.txt | 4 ++-- src/Corrade/Containers/CMakeLists.txt | 4 ++-- src/Corrade/Containers/{Python.h => PythonBindings.h} | 5 ++--- src/Corrade/{Python.h => PythonBindings.h} | 4 ++-- src/Magnum/CMakeLists.txt | 4 ++-- src/Magnum/GL/CMakeLists.txt | 4 ++-- src/Magnum/GL/{Python.h => PythonBindings.h} | 6 +++--- src/Magnum/{Python.h => PythonBindings.h} | 4 ++-- src/Magnum/SceneGraph/CMakeLists.txt | 4 ++-- src/Magnum/SceneGraph/{Python.h => PythonBindings.h} | 4 ++-- src/python/corrade/PyBuffer.h | 2 +- src/python/corrade/containers.cpp | 2 +- src/python/corrade/pluginmanager.cpp | 2 +- src/python/corrade/pluginmanager.h | 2 +- src/python/magnum/gl.cpp | 6 +++--- src/python/magnum/magnum.cpp | 6 +++--- src/python/magnum/platform/glfw.cpp | 2 +- src/python/magnum/platform/sdl2.cpp | 2 +- src/python/magnum/scenegraph.h | 2 +- src/python/magnum/shaders.cpp | 2 +- src/python/magnum/trade.cpp | 4 ++-- 21 files changed, 37 insertions(+), 38 deletions(-) rename src/Corrade/Containers/{Python.h => PythonBindings.h} (96%) rename src/Corrade/{Python.h => PythonBindings.h} (98%) rename src/Magnum/GL/{Python.h => PythonBindings.h} (95%) rename src/Magnum/{Python.h => PythonBindings.h} (97%) rename src/Magnum/SceneGraph/{Python.h => PythonBindings.h} (98%) diff --git a/src/Corrade/CMakeLists.txt b/src/Corrade/CMakeLists.txt index d3fbf43..d8eb55d 100644 --- a/src/Corrade/CMakeLists.txt +++ b/src/Corrade/CMakeLists.txt @@ -24,7 +24,7 @@ # if(WITH_PYTHON) - add_custom_target(CorradePython SOURCES Python.h) + add_custom_target(CorradePython SOURCES PythonBindings.h) set_target_properties(CorradePython PROPERTIES FOLDER "Corrade/Python") - install(FILES Python.h DESTINATION ${CORRADE_INCLUDE_INSTALL_DIR}) + install(FILES PythonBindings.h DESTINATION ${CORRADE_INCLUDE_INSTALL_DIR}) endif() diff --git a/src/Corrade/Containers/CMakeLists.txt b/src/Corrade/Containers/CMakeLists.txt index 6646c3d..f3ba2f4 100644 --- a/src/Corrade/Containers/CMakeLists.txt +++ b/src/Corrade/Containers/CMakeLists.txt @@ -24,7 +24,7 @@ # if(WITH_PYTHON) - add_custom_target(CorradeContainersPython SOURCES Python.h) + add_custom_target(CorradeContainersPython SOURCES PythonBindings.h) set_target_properties(CorradeContainersPython PROPERTIES FOLDER "Corrade/Python") - install(FILES Python.h DESTINATION ${CORRADE_INCLUDE_INSTALL_DIR}/Containers) + install(FILES PythonBindings.h DESTINATION ${CORRADE_INCLUDE_INSTALL_DIR}/Containers) endif() diff --git a/src/Corrade/Containers/Python.h b/src/Corrade/Containers/PythonBindings.h similarity index 96% rename from src/Corrade/Containers/Python.h rename to src/Corrade/Containers/PythonBindings.h index e61f7aa..5cfae48 100644 --- a/src/Corrade/Containers/Python.h +++ b/src/Corrade/Containers/PythonBindings.h @@ -1,5 +1,5 @@ -#ifndef Corrade_Containers_Python_h -#define Corrade_Containers_Python_h +#ifndef Corrade_Containers_PythonBindings_h +#define Corrade_Containers_PythonBindings_h /* This file is part of Magnum. @@ -53,4 +53,3 @@ template PyArrayViewHolder pyArrayViewHolder(const T& view, pybind11 PYBIND11_DECLARE_HOLDER_TYPE(T, Corrade::Containers::PyArrayViewHolder) #endif - diff --git a/src/Corrade/Python.h b/src/Corrade/PythonBindings.h similarity index 98% rename from src/Corrade/Python.h rename to src/Corrade/PythonBindings.h index d224d79..c8ca721 100644 --- a/src/Corrade/Python.h +++ b/src/Corrade/PythonBindings.h @@ -1,5 +1,5 @@ -#ifndef Corrade_Python_h -#define Corrade_Python_h +#ifndef Corrade_PythonBindings_h +#define Corrade_PythonBindings_h /* This file is part of Magnum. diff --git a/src/Magnum/CMakeLists.txt b/src/Magnum/CMakeLists.txt index 0740f9c..5cc70c3 100644 --- a/src/Magnum/CMakeLists.txt +++ b/src/Magnum/CMakeLists.txt @@ -51,9 +51,9 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/versionBindings.h.cmake install(FILES ${CMAKE_CURRENT_BINARY_DIR}/versionBindings.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}) if(WITH_PYTHON) - add_custom_target(MagnumPython SOURCES Python.h) + add_custom_target(MagnumPython SOURCES PythonBindings.h) set_target_properties(MagnumPython PROPERTIES FOLDER "Magnum/Python") - install(FILES Python.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}) + install(FILES PythonBindings.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}) endif() find_package(Magnum COMPONENTS GL SceneGraph) diff --git a/src/Magnum/GL/CMakeLists.txt b/src/Magnum/GL/CMakeLists.txt index d49468d..b23c33d 100644 --- a/src/Magnum/GL/CMakeLists.txt +++ b/src/Magnum/GL/CMakeLists.txt @@ -24,7 +24,7 @@ # if(WITH_PYTHON) - add_custom_target(MagnumGLPython SOURCES Python.h) + add_custom_target(MagnumGLPython SOURCES PythonBindings.h) set_target_properties(MagnumGLPython PROPERTIES FOLDER "Magnum/Python") - install(FILES Python.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/GL) + install(FILES PythonBindings.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/GL) endif() diff --git a/src/Magnum/GL/Python.h b/src/Magnum/GL/PythonBindings.h similarity index 95% rename from src/Magnum/GL/Python.h rename to src/Magnum/GL/PythonBindings.h index 0ca1db1..68bcdb4 100644 --- a/src/Magnum/GL/Python.h +++ b/src/Magnum/GL/PythonBindings.h @@ -1,5 +1,5 @@ -#ifndef Magnum_GL_Python_h -#define Magnum_GL_Python_h +#ifndef Magnum_GL_PythonBindings_h +#define Magnum_GL_PythonBindings_h /* This file is part of Magnum. @@ -30,7 +30,7 @@ #include #include -#include "Magnum/Python.h" +#include "Magnum/PythonBindings.h" namespace Magnum { namespace GL { diff --git a/src/Magnum/Python.h b/src/Magnum/PythonBindings.h similarity index 97% rename from src/Magnum/Python.h rename to src/Magnum/PythonBindings.h index 0d3c62a..c256ad0 100644 --- a/src/Magnum/Python.h +++ b/src/Magnum/PythonBindings.h @@ -1,5 +1,5 @@ -#ifndef Magnum_Python_h -#define Magnum_Python_h +#ifndef Magnum_PythonBindings_h +#define Magnum_PythonBindings_h /* This file is part of Magnum. diff --git a/src/Magnum/SceneGraph/CMakeLists.txt b/src/Magnum/SceneGraph/CMakeLists.txt index e2bf6c0..fc5b300 100644 --- a/src/Magnum/SceneGraph/CMakeLists.txt +++ b/src/Magnum/SceneGraph/CMakeLists.txt @@ -24,7 +24,7 @@ # if(WITH_PYTHON) - add_custom_target(MagnumSceneGraphPython SOURCES Python.h) + add_custom_target(MagnumSceneGraphPython SOURCES PythonBindings.h) set_target_properties(MagnumSceneGraphPython PROPERTIES FOLDER "Magnum/Python") - install(FILES Python.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/SceneGraph) + install(FILES PythonBindings.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/SceneGraph) endif() diff --git a/src/Magnum/SceneGraph/Python.h b/src/Magnum/SceneGraph/PythonBindings.h similarity index 98% rename from src/Magnum/SceneGraph/Python.h rename to src/Magnum/SceneGraph/PythonBindings.h index a81355c..8fce706 100644 --- a/src/Magnum/SceneGraph/Python.h +++ b/src/Magnum/SceneGraph/PythonBindings.h @@ -1,5 +1,5 @@ -#ifndef Magnum_SceneGraph_Python_h -#define Magnum_SceneGraph_Python_h +#ifndef Magnum_SceneGraph_PythonBindings_h +#define Magnum_SceneGraph_PythonBindings_h /* This file is part of Magnum. diff --git a/src/python/corrade/PyBuffer.h b/src/python/corrade/PyBuffer.h index f1ca8dc..ca7e707 100644 --- a/src/python/corrade/PyBuffer.h +++ b/src/python/corrade/PyBuffer.h @@ -29,7 +29,7 @@ #include #include -#include "Corrade/Python.h" +#include "Corrade/PythonBindings.h" #include "bootstrap.h" diff --git a/src/python/corrade/containers.cpp b/src/python/corrade/containers.cpp index 0b43b93..09cdfde 100644 --- a/src/python/corrade/containers.cpp +++ b/src/python/corrade/containers.cpp @@ -28,7 +28,7 @@ #include #include -#include "Corrade/Containers/Python.h" +#include "Corrade/Containers/PythonBindings.h" #include "corrade/bootstrap.h" #include "corrade/PyBuffer.h" diff --git a/src/python/corrade/pluginmanager.cpp b/src/python/corrade/pluginmanager.cpp index 5988e40..898f39a 100644 --- a/src/python/corrade/pluginmanager.cpp +++ b/src/python/corrade/pluginmanager.cpp @@ -27,7 +27,7 @@ #include /* for pluginList() and aliasList() */ #include -#include "Corrade/Python.h" +#include "Corrade/PythonBindings.h" #include "corrade/bootstrap.h" #include "corrade/EnumOperators.h" diff --git a/src/python/corrade/pluginmanager.h b/src/python/corrade/pluginmanager.h index 08825dd..07c1259 100644 --- a/src/python/corrade/pluginmanager.h +++ b/src/python/corrade/pluginmanager.h @@ -29,7 +29,7 @@ #include #include -#include "Corrade/Python.h" +#include "Corrade/PythonBindings.h" #include "corrade/bootstrap.h" diff --git a/src/python/magnum/gl.cpp b/src/python/magnum/gl.cpp index 68ff5ef..c9a77a2 100644 --- a/src/python/magnum/gl.cpp +++ b/src/python/magnum/gl.cpp @@ -43,9 +43,9 @@ #include #include -#include "Corrade/Python.h" -#include "Magnum/Python.h" -#include "Magnum/GL/Python.h" +#include "Corrade/PythonBindings.h" +#include "Magnum/PythonBindings.h" +#include "Magnum/GL/PythonBindings.h" #include "corrade/EnumOperators.h" #include "magnum/bootstrap.h" diff --git a/src/python/magnum/magnum.cpp b/src/python/magnum/magnum.cpp index c25f234..f743082 100644 --- a/src/python/magnum/magnum.cpp +++ b/src/python/magnum/magnum.cpp @@ -33,9 +33,9 @@ #include #include -#include "Corrade/Python.h" -#include "Corrade/Containers/Python.h" -#include "Magnum/Python.h" +#include "Corrade/PythonBindings.h" +#include "Corrade/Containers/PythonBindings.h" +#include "Magnum/PythonBindings.h" #include "magnum/bootstrap.h" diff --git a/src/python/magnum/platform/glfw.cpp b/src/python/magnum/platform/glfw.cpp index e27da60..9d37795 100644 --- a/src/python/magnum/platform/glfw.cpp +++ b/src/python/magnum/platform/glfw.cpp @@ -26,7 +26,7 @@ #include #include -#include "Corrade/Python.h" +#include "Corrade/PythonBindings.h" #include "magnum/bootstrap.h" #include "magnum/platform/application.h" diff --git a/src/python/magnum/platform/sdl2.cpp b/src/python/magnum/platform/sdl2.cpp index 4a8956f..1eeae00 100644 --- a/src/python/magnum/platform/sdl2.cpp +++ b/src/python/magnum/platform/sdl2.cpp @@ -26,7 +26,7 @@ #include #include -#include "Corrade/Python.h" +#include "Corrade/PythonBindings.h" #include "magnum/bootstrap.h" #include "magnum/platform/application.h" diff --git a/src/python/magnum/scenegraph.h b/src/python/magnum/scenegraph.h index 111a5c6..91b4e11 100644 --- a/src/python/magnum/scenegraph.h +++ b/src/python/magnum/scenegraph.h @@ -29,7 +29,7 @@ #include #include -#include "Magnum/SceneGraph/Python.h" +#include "Magnum/SceneGraph/PythonBindings.h" #include "magnum/bootstrap.h" diff --git a/src/python/magnum/shaders.cpp b/src/python/magnum/shaders.cpp index 245e731..2772fbd 100644 --- a/src/python/magnum/shaders.cpp +++ b/src/python/magnum/shaders.cpp @@ -35,7 +35,7 @@ #include #include -#include "Corrade/Python.h" +#include "Corrade/PythonBindings.h" #include "corrade/EnumOperators.h" #include "magnum/bootstrap.h" diff --git a/src/python/magnum/trade.cpp b/src/python/magnum/trade.cpp index 8561c63..b29e84a 100644 --- a/src/python/magnum/trade.cpp +++ b/src/python/magnum/trade.cpp @@ -31,8 +31,8 @@ #include #include -#include "Corrade/Containers/Python.h" -#include "Magnum/Python.h" +#include "Corrade/Containers/PythonBindings.h" +#include "Magnum/PythonBindings.h" #include "corrade/pluginmanager.h" #include "magnum/bootstrap.h"