-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
957e895
commit 362e00a
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import os | ||
|
||
RSXML_VERSION = '2.0.1' | ||
from qgis.core import QgsMessageLog, Qgis | ||
|
||
RSXML_VERSION = '2.0.6' | ||
|
||
# This is how we import the rsxml module. We do this because we want to bundle the rsxml whl with this package | ||
try: | ||
import rsxml | ||
print('rsxml imported from site-packages') | ||
QgsMessageLog.logMessage('rsxml imported from system', 'Riverscapes Viewer', Qgis.Info) | ||
except ImportError: | ||
import sys | ||
import os | ||
this_dir = os.path.dirname(os.path.realpath(__file__)) | ||
path = os.path.join(this_dir, '..', 'wheels', f'rsxml-{RSXML_VERSION}-py3-none-any.whl') | ||
sys.path.append(path) | ||
if not os.path.exists(path): | ||
raise Exception('rsxml wheel not found at {}.'.format(path)) | ||
raise Exception(f'rsxml wheel not found at {path}.') | ||
import rsxml | ||
print('rsxml imported from wheels') | ||
QgsMessageLog.logMessage(f'rsxml imported from wheel {path}', 'Riverscapes Viewer', Qgis.Info) |