Browse Source

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.
pull/9/head
Vladimír Vondruš 6 years ago
parent
commit
1d278d1112
  1. 4
      src/Corrade/CMakeLists.txt
  2. 4
      src/Corrade/Containers/CMakeLists.txt
  3. 5
      src/Corrade/Containers/PythonBindings.h
  4. 4
      src/Corrade/PythonBindings.h
  5. 4
      src/Magnum/CMakeLists.txt
  6. 4
      src/Magnum/GL/CMakeLists.txt
  7. 6
      src/Magnum/GL/PythonBindings.h
  8. 4
      src/Magnum/PythonBindings.h
  9. 4
      src/Magnum/SceneGraph/CMakeLists.txt
  10. 4
      src/Magnum/SceneGraph/PythonBindings.h
  11. 2
      src/python/corrade/PyBuffer.h
  12. 2
      src/python/corrade/containers.cpp
  13. 2
      src/python/corrade/pluginmanager.cpp
  14. 2
      src/python/corrade/pluginmanager.h
  15. 6
      src/python/magnum/gl.cpp
  16. 6
      src/python/magnum/magnum.cpp
  17. 2
      src/python/magnum/platform/glfw.cpp
  18. 2
      src/python/magnum/platform/sdl2.cpp
  19. 2
      src/python/magnum/scenegraph.h
  20. 2
      src/python/magnum/shaders.cpp
  21. 4
      src/python/magnum/trade.cpp

4
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()

4
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()

5
src/Corrade/Containers/Python.h → 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<class T> PyArrayViewHolder<T> pyArrayViewHolder(const T& view, pybind11
PYBIND11_DECLARE_HOLDER_TYPE(T, Corrade::Containers::PyArrayViewHolder<T>)
#endif

4
src/Corrade/Python.h → 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.

4
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)

4
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()

6
src/Magnum/GL/Python.h → 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 <pybind11/pybind11.h>
#include <Magnum/GL/GL.h>
#include "Magnum/Python.h"
#include "Magnum/PythonBindings.h"
namespace Magnum { namespace GL {

4
src/Magnum/Python.h → 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.

4
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()

4
src/Magnum/SceneGraph/Python.h → 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.

2
src/python/corrade/PyBuffer.h

@ -29,7 +29,7 @@
#include <Corrade/Containers/Pointer.h>
#include <Corrade/Containers/StridedArrayView.h>
#include "Corrade/Python.h"
#include "Corrade/PythonBindings.h"
#include "bootstrap.h"

2
src/python/corrade/containers.cpp

@ -28,7 +28,7 @@
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/ScopeGuard.h>
#include "Corrade/Containers/Python.h"
#include "Corrade/Containers/PythonBindings.h"
#include "corrade/bootstrap.h"
#include "corrade/PyBuffer.h"

2
src/python/corrade/pluginmanager.cpp

@ -27,7 +27,7 @@
#include <pybind11/stl.h> /* for pluginList() and aliasList() */
#include <Corrade/PluginManager/AbstractManager.h>
#include "Corrade/Python.h"
#include "Corrade/PythonBindings.h"
#include "corrade/bootstrap.h"
#include "corrade/EnumOperators.h"

2
src/python/corrade/pluginmanager.h

@ -29,7 +29,7 @@
#include <pybind11/pybind11.h>
#include <Corrade/PluginManager/Manager.h>
#include "Corrade/Python.h"
#include "Corrade/PythonBindings.h"
#include "corrade/bootstrap.h"

6
src/python/magnum/gl.cpp

@ -43,9 +43,9 @@
#include <Magnum/GL/Version.h>
#include <Magnum/Math/Color.h>
#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"

6
src/python/magnum/magnum.cpp

@ -33,9 +33,9 @@
#include <Magnum/PixelStorage.h>
#include <Magnum/Sampler.h>
#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"

2
src/python/magnum/platform/glfw.cpp

@ -26,7 +26,7 @@
#include <pybind11/pybind11.h>
#include <Magnum/Platform/GlfwApplication.h>
#include "Corrade/Python.h"
#include "Corrade/PythonBindings.h"
#include "magnum/bootstrap.h"
#include "magnum/platform/application.h"

2
src/python/magnum/platform/sdl2.cpp

@ -26,7 +26,7 @@
#include <pybind11/pybind11.h>
#include <Magnum/Platform/Sdl2Application.h>
#include "Corrade/Python.h"
#include "Corrade/PythonBindings.h"
#include "magnum/bootstrap.h"
#include "magnum/platform/application.h"

2
src/python/magnum/scenegraph.h

@ -29,7 +29,7 @@
#include <Magnum/SceneGraph/Object.h>
#include <Magnum/SceneGraph/Scene.h>
#include "Magnum/SceneGraph/Python.h"
#include "Magnum/SceneGraph/PythonBindings.h"
#include "magnum/bootstrap.h"

2
src/python/magnum/shaders.cpp

@ -35,7 +35,7 @@
#include <Magnum/Shaders/Phong.h>
#include <Magnum/Shaders/VertexColor.h>
#include "Corrade/Python.h"
#include "Corrade/PythonBindings.h"
#include "corrade/EnumOperators.h"
#include "magnum/bootstrap.h"

4
src/python/magnum/trade.cpp

@ -31,8 +31,8 @@
#include <Magnum/Trade/ImageData.h>
#include <Magnum/Trade/MeshData.h>
#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"

Loading…
Cancel
Save