]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move python wrapper to contrib/python-bindings.
authorBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 22 Jul 2016 17:30:52 +0000 (13:30 -0400)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 3 Aug 2016 20:34:02 +0000 (16:34 -0400)
18 files changed:
CMakeLists.txt
contrib/python-bindings/include/cell_accessor_wrapper.h [moved from include/deal.II/python/cell_accessor_wrapper.h with 100% similarity]
contrib/python-bindings/include/point_wrapper.h [moved from include/deal.II/python/point_wrapper.h with 100% similarity]
contrib/python-bindings/include/triangulation_wrapper.h [moved from include/deal.II/python/triangulation_wrapper.h with 99% similarity]
contrib/python-bindings/source/CMakeLists.txt [moved from source/python/CMakeLists.txt with 90% similarity]
contrib/python-bindings/source/__init__.py [moved from source/python/__init__.py with 92% similarity]
contrib/python-bindings/source/cell_accessor_wrapper.cc [moved from source/python/cell_accessor_wrapper.cc with 99% similarity]
contrib/python-bindings/source/export_cell_accessor.cc [moved from source/python/export_cell_accessor.cc with 97% similarity]
contrib/python-bindings/source/export_point.cc [moved from source/python/export_point.cc with 96% similarity]
contrib/python-bindings/source/export_triangulation.cc [moved from source/python/export_triangulation.cc with 98% similarity]
contrib/python-bindings/source/point_wrapper.cc [moved from source/python/point_wrapper.cc with 98% similarity]
contrib/python-bindings/source/triangulation_wrapper.cc [moved from source/python/triangulation_wrapper.cc with 99% similarity]
contrib/python-bindings/source/wrappers.cc [moved from source/python/wrappers.cc with 100% similarity]
contrib/python-bindings/tests/cell_accessor_wrapper.py [moved from tests/python/cell_accessor_wrapper.py with 100% similarity]
contrib/python-bindings/tests/point_wrapper.py [moved from tests/python/point_wrapper.py with 100% similarity]
contrib/python-bindings/tests/triangulation_wrapper.py [moved from tests/python/triangulation_wrapper.py with 100% similarity]
source/CMakeLists.txt
source/python/dummy.py [deleted file]

index 478691aa156d6f839268410a08a89388af7fa70b..fb2debfca6e02a4d33d3a9490bbba71054f25c7a 100644 (file)
@@ -151,6 +151,8 @@ ADD_SUBDIRECTORY(source) # has to be included after bundled
 ADD_SUBDIRECTORY(cmake/config) # has to be included after source
 ADD_SUBDIRECTORY(examples)
 
+ADD_SUBDIRECTORY(contrib/python-bindings/source)
+
 IF(DEAL_II_HAVE_TESTS_DIRECTORY)
   ADD_SUBDIRECTORY(tests)
 ENDIF()
similarity index 99%
rename from include/deal.II/python/triangulation_wrapper.h
rename to contrib/python-bindings/include/triangulation_wrapper.h
index 29a35545b0f0f3175bda92562984884688d55904..13b7367b9a5c67474b458940c6ff52f0c4b9d668 100644 (file)
@@ -16,8 +16,8 @@
 #ifndef dealii__triangulation_wrapper_h
 #define dealii__triangulation_wrapper_h
 
+#include <point_wrapper.h>
 #include <boost/python.hpp>
-#include <deal.II/python/point_wrapper.h>
 #include <string>
 #include <vector>
 
similarity index 90%
rename from source/python/CMakeLists.txt
rename to contrib/python-bindings/source/CMakeLists.txt
index 9955bd01b69821627dea5bf505e3dc8e09d746e0..b490eee0cc8283ef9d965271ec8bdb67b123f330 100644 (file)
@@ -17,6 +17,13 @@ FIND_LIBRARY(Boost_PYTHON_LIBRARY boost_python PATH ${Boost_LIBRARY_DIRS} NO_DEF
 INCLUDE(FindPythonLibs)
 INCLUDE(FindPythonInterp)
 INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
+INCLUDE_DIRECTORIES(
+  ${CMAKE_BINARY_DIR}/include/
+  ${CMAKE_SOURCE_DIR}/include/
+  ${DEAL_II_BUNDLED_INCLUDE_DIRS}
+  ${DEAL_II_INCLUDE_DIRS}
+  ${CMAKE_SOURCE_DIR}/contrib/python-bindings/include/
+  )
 INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIRS})
 
 SET(_src
@@ -29,11 +36,6 @@ SET(_src
   triangulation_wrapper.cc
   )
 
-FILE(GLOB _header
-  ${CMAKE_SOURCE_DIR}/include/deal.II/python/*.h
-  )
-
-
 PYTHON_ADD_MODULE(PyDealII ${_src})
 
 SET(PYTHON_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
@@ -50,14 +52,14 @@ INSTALL(TARGETS PyDealII DESTINATION ${PYTHON_INSTALL_PREFIX}/pydealii)
 
 SET(PYTHON_SOURCES
   __init__.py
-  dummy.py
   )                                                                                                                                                                                                               
+
 FOREACH(PYTHON_SOURCE ${PYTHON_SOURCES})                                                                                                                                                                            
   ADD_CUSTOM_COMMAND(                                                                                                                                                                                             
     OUTPUT ${CMAKE_BINARY_DIR}/python/pydealii/${PYTHON_SOURCE}                                                                                                                                                    
-    DEPENDS ${CMAKE_SOURCE_DIR}/source/python/${PYTHON_SOURCE}                                                                                                                                                  
+    DEPENDS ${CMAKE_SOURCE_DIR}/contrib/python-bindings/source/${PYTHON_SOURCE}
     COMMAND ${CMAKE_COMMAND}                                                                                                                                                                                    
-    ARGS -E copy ${CMAKE_SOURCE_DIR}/source/python/${PYTHON_SOURCE} ${CMAKE_BINARY_DIR}/python/pydealii/${PYTHON_SOURCE}                                                                                           
+    ARGS -E copy ${CMAKE_SOURCE_DIR}/contrib/python-bindings/source/${PYTHON_SOURCE} ${CMAKE_BINARY_DIR}/python/pydealii/${PYTHON_SOURCE}
     COMMENT "Copying ${PYTHON_SOURCE}"                                                                                                                                                                          
     )                                                                                                                                                                                                           
   ADD_CUSTOM_TARGET(                                                                                                                                                                                              
similarity index 92%
rename from source/python/__init__.py
rename to contrib/python-bindings/source/__init__.py
index f6326327e043c30b879c5ba4013603b6b64aa400..dd99d5fdbd143c07097e00f61a935f9da44f406c 100644 (file)
@@ -14,7 +14,6 @@
 # ---------------------------------------------------------------------
 
 from .PyDealII import *
-from .dummy import *
 
-__all__ = ['PyDealII', 'dummy']
+__all__ = ['PyDealII']
 __doc__ = PyDealII.__doc__
similarity index 99%
rename from source/python/cell_accessor_wrapper.cc
rename to contrib/python-bindings/source/cell_accessor_wrapper.cc
index 1b17a91f0b2057a9e4ae8dea3e19dc1124d8134b..fc3ba9bf54d103ef9e0ba7e4f86593f1f998b18d 100644 (file)
 //
 // ---------------------------------------------------------------------
 
+#include <point_wrapper.h>
+#include <triangulation_wrapper.h>
+#include <cell_accessor_wrapper.h>
 #include <boost/python.hpp>
-#include <deal.II/python/point_wrapper.h>
-#include <deal.II/python/triangulation_wrapper.h>
-#include <deal.II/python/cell_accessor_wrapper.h>
 
 DEAL_II_NAMESPACE_OPEN
 
similarity index 97%
rename from source/python/export_cell_accessor.cc
rename to contrib/python-bindings/source/export_cell_accessor.cc
index fef76167cadd3a95ca932dcdcab2942f62ff4c8e..52891c2dff10620a6c939eb248bdbbc6412d112a 100644 (file)
@@ -13,9 +13,9 @@
 //
 // ---------------------------------------------------------------------
 
+#include <cell_accessor_wrapper.h>
+#include <triangulation_wrapper.h>
 #include <boost/python.hpp>
-#include <deal.II/python/cell_accessor_wrapper.h>
-#include <deal.II/python/triangulation_wrapper.h>
 
 DEAL_II_NAMESPACE_OPEN
 
similarity index 96%
rename from source/python/export_point.cc
rename to contrib/python-bindings/source/export_point.cc
index 1fbb7ed736196d8b417222a7b87f55ab2d84d257..e79c82c05835a10eb43bd1aab68197e5e9f5b62d 100644 (file)
 //
 // ---------------------------------------------------------------------
 
-#include <boost/python.hpp>
-#include <deal.II/python/point_wrapper.h>
+#include <point_wrapper.h>
 #include <deal.II/base/point.h>
 #include <deal.II/base/exceptions.h>
+#include <boost/python.hpp>
 
 DEAL_II_NAMESPACE_OPEN
 
similarity index 98%
rename from source/python/export_triangulation.cc
rename to contrib/python-bindings/source/export_triangulation.cc
index 755c09d522d3f3bffac5406eacaeb7c0180eccec..d2cede42e40783a65334547ccad51748362e7cca 100644 (file)
@@ -13,9 +13,9 @@
 //
 // ---------------------------------------------------------------------
 
+#include <triangulation_wrapper.h>
+#include <cell_accessor_wrapper.h>
 #include <boost/python.hpp>
-#include <deal.II/python/triangulation_wrapper.h>
-#include <deal.II/python/cell_accessor_wrapper.h>
 
 DEAL_II_NAMESPACE_OPEN
 
similarity index 98%
rename from source/python/point_wrapper.cc
rename to contrib/python-bindings/source/point_wrapper.cc
index 8c9778fca8363a15d9d8935b2599f0d9b65e08ac..833786b8d010dcda6cfffc97732202c1321f1e5a 100644 (file)
@@ -13,7 +13,7 @@
 //
 // ---------------------------------------------------------------------
 
-#include <deal.II/python/point_wrapper.h>
+#include <point_wrapper.h>
 #include <deal.II/base/point.h>
 
 DEAL_II_NAMESPACE_OPEN
similarity index 99%
rename from source/python/triangulation_wrapper.cc
rename to contrib/python-bindings/source/triangulation_wrapper.cc
index ea0e0c2ae0d15ffd88380bb7d0c9cd734c542801..84222ac8638e9a7733214a75f9059c17f80546ff 100644 (file)
@@ -13,8 +13,8 @@
 //
 // ---------------------------------------------------------------------
 
-#include <deal.II/python/triangulation_wrapper.h>
-#include <deal.II/python/cell_accessor_wrapper.h>
+#include <triangulation_wrapper.h>
+#include <cell_accessor_wrapper.h>
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_out.h>
index 3da4617522f9289594b17af10c0d5072f7a96e77..4d3e8f7b4fd90281125145a93809e50a70fd3384 100644 (file)
@@ -48,9 +48,6 @@ ADD_SUBDIRECTORY(integrators)
 ADD_SUBDIRECTORY(matrix_free)
 ADD_SUBDIRECTORY(meshworker)
 ADD_SUBDIRECTORY(opencascade)
-IF(DEAL_II_WITH_PYTHON)
-  ADD_SUBDIRECTORY(python)
-ENDIF()
 
 FOREACH(build ${DEAL_II_BUILD_TYPES})
   STRING(TOLOWER ${build} build_lowercase)
diff --git a/source/python/dummy.py b/source/python/dummy.py
deleted file mode 100644 (file)
index 4523f75..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (C) 2016 by the deal.II authors
-#
-# This file is part of the deal.II library.
-#
-# The deal.II library is free software; you can use it, redistribute
-# it, and/or modify it under the terms of the GNU Lesser General
-# Public License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The full text of the license can be found in the file LICENSE at
-# the top level of the deal.II distribution.
-#
-# ---------------------------------------------------------------------
-
-"""This a dummy module that contains a global function and a class."""
-
-__all__ = ['Dummy', 'bar']
-
-def bar():
-    """Print bar."""
-    print('bar')
-
-class Dummy:
-    """This a dummy class that has only one member function."""
-    
-    def foo(self):
-        """Print foo."""
-        print('foo')

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.