Use cwrap library from ert
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCClass
|
||||
from cwrap import BaseCClass
|
||||
from opm import OPMPrototype
|
||||
|
||||
class Deck(BaseCClass):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCClass
|
||||
from cwrap import BaseCClass
|
||||
from opm import OPMPrototype
|
||||
from opm.deck import ItemType
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCClass
|
||||
from cwrap import BaseCClass
|
||||
from opm import OPMPrototype
|
||||
|
||||
class DeckKeyword(BaseCClass):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCClass
|
||||
from cwrap import BaseCClass
|
||||
from opm import OPMPrototype
|
||||
|
||||
class DeckRecord(BaseCClass):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCEnum
|
||||
from cwrap import BaseCEnum
|
||||
|
||||
|
||||
class ItemType(BaseCEnum):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCClass
|
||||
from cwrap import BaseCClass
|
||||
|
||||
from opm import OPMPrototype
|
||||
from opm.deck import Deck
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCClass
|
||||
from cwrap import BaseCClass
|
||||
from ert.util import CTime
|
||||
from opm import OPMPrototype
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import os.path
|
||||
|
||||
from ert.cwrap import BaseCClass
|
||||
from cwrap import BaseCClass
|
||||
from opm import OPMPrototype
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import os.path
|
||||
|
||||
from ert.cwrap import BaseCClass
|
||||
from cwrap import BaseCClass
|
||||
from opm import OPMPrototype
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCEnum
|
||||
from cwrap import BaseCEnum
|
||||
|
||||
|
||||
class ErrorAction(BaseCEnum):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ert.cwrap import BaseCClass, CWrapper
|
||||
from cwrap import BaseCClass, CWrapper
|
||||
from opm import OPMPrototype
|
||||
|
||||
class ParseContext(BaseCClass):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user