Skip to content

Commit

Permalink
Updates for KIM API v2.0.2
Browse files Browse the repository at this point in the history
KIM API v2.0.2 was introduced to change the package/lib name from
'kim-api-v2' -> 'kim-api'.  The API's utilities have changed
accordingly.
  • Loading branch information
dskarls committed Mar 28, 2019
1 parent 2581cbe commit 0446b91
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions api_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
CompatibleTable['0.2.0'] = {'target': '2.0.0', 'backward': '2.0.0'}
CompatibleTable['0.2.1'] = {'target': '2.0.1', 'backward': '2.0.0'}
CompatibleTable['0.2.2'] = {'target': '2.0.1', 'backward': '2.0.0'}
CompatibleTable['0.2.3'] = {'target': '2.0.2', 'backward': '2.0.0'}


def compare_version(x, y):
Expand Down
2 changes: 1 addition & 1 deletion kimpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.2.2'
__version__ = '0.2.3'

# import all modules
from . import model
Expand Down
4 changes: 2 additions & 2 deletions kimpy/simulator_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,12 @@ def get_kim_api_simulator_model_utility():
'''
try:
libexec_path = subprocess.check_output(
["pkg-config", "--variable=libexecdir", "libkim-api-v2"],
["pkg-config", "--variable=libexecdir", "libkim-api"],
universal_newlines=True).strip().rstrip("/")
except:
raise KIMSMError(
'ERROR: Unable to obtain libexec-path from KIM API utility.')
return os.path.join(libexec_path, "kim-api-v2", "kim-api-v2-simulator-model")
return os.path.join(libexec_path, "kim-api", "kim-api-simulator-model")


def is_simulator_model(model):
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
def inquire_kim_api(key):
""" Get compile and link flags of kim-api."""
try:
config = subprocess.check_output(['pkg-config', key, 'libkim-api-v2'],
config = subprocess.check_output(['pkg-config', key, 'libkim-api'],
universal_newlines=True)
except:
raise Exception('"libkim-api-v2" not found. Make sure "kim-api-v2" is '
raise Exception('"libkim-api" not found. Make sure "kim-api" is '
'installed and do not forget to '
'"source path/to/kim-api-v2-activate".')
'"source path/to/kim-api-activate".')

split_config = [s for s in config.strip().split(' ')]

Expand Down

0 comments on commit 0446b91

Please sign in to comment.