Use cwrap library from ert

This commit is contained in:
Pål Grønås Drange
2016-10-04 11:50:57 +02:00
parent 5a0e4c191d
commit 7ef665994b
14 changed files with 16 additions and 18 deletions

View File

@@ -1,8 +1,7 @@
import ctypes
from ert.cwrap.clib import lib_name
from ert.cwrap.metacwrap import Prototype
from cwrap import lib_name, Prototype
lib_path = None
so_version = ""
@@ -24,7 +23,6 @@ except ImportError:
class OPMPrototype(Prototype):
lib_file = lib_name( "libcopmparser" , path = lib_path , so_version = so_version)
lib = ctypes.CDLL( lib_file , ctypes.RTLD_GLOBAL )
def __init__(self , prototype , bind = True):
super(OPMPrototype , self).__init__( OPMPrototype.lib , prototype , bind = bind)

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype
class Deck(BaseCClass):

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype
from opm.deck import ItemType

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype
class DeckKeyword(BaseCClass):

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype
class DeckRecord(BaseCClass):

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCEnum
from cwrap import BaseCEnum
class ItemType(BaseCEnum):

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype
from opm.deck import Deck

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from ert.util import CTime
from opm import OPMPrototype

View File

@@ -1,6 +1,6 @@
import os.path
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype
from .table_index import TableIndex

View File

@@ -1,6 +1,6 @@
import os.path
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype

View File

@@ -1,6 +1,6 @@
import os.path
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCEnum
from cwrap import BaseCEnum
class ErrorAction(BaseCEnum):

View File

@@ -1,4 +1,4 @@
from ert.cwrap import BaseCClass, CWrapper
from cwrap import BaseCClass, CWrapper
from opm import OPMPrototype
class ParseContext(BaseCClass):

View File

@@ -3,7 +3,7 @@ import json
import inspect
from functools import partial
from ert.cwrap import BaseCClass
from cwrap import BaseCClass
from opm import OPMPrototype
from opm.deck import Deck
from opm.parser import ParseContext