From 827f688a56f6c893cbab197704522eceb13a0974 Mon Sep 17 00:00:00 2001 From: jlaura <jlaura@usgs.gov> Date: Thu, 23 Aug 2018 08:38:04 -0700 Subject: [PATCH] Fixes #5 (#6) * Fixes #5 --- .travis.yml | 7 +++++-- python/__init__.py | 2 +- tests/test_plugin.py | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 31158e1..e444fc2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,11 @@ install: - conda config --add channels conda-forge # Setup to do the build - conda install -y -q conda-build anaconda-client -- conda config --set anaconda_upload yes script: # Build and upload on success -- conda build --token $CONDA_UPLOAD_TOKEN recipe -q +- if [ "${TRAVIS_PULL_REQUEST}" = "false" ] ;then + conda config --set anaconda_upload yes && conda build --token $CONDA_UPLOAD_TOKEN recipe -q; + else + conda build recipe -q; + fi diff --git a/python/__init__.py b/python/__init__.py index 799e34c..5da1eda 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1 +1 @@ -from csmapi import * +from csmapi.csmapi import * diff --git a/tests/test_plugin.py b/tests/test_plugin.py index e342431..0fb697a 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -2,9 +2,10 @@ import pytest import csmapi import ctypes +from ctypes.util import find_library # Load a plugin with CSM compliant sensors -lib = ctypes.CDLL('/data/big/github/CSM-CameraModel/build/libusgscsm.so') +lib = ctypes.CDLL(find_library('usgscsm.so')) @pytest.fixture def plugin(): -- GitLab