-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updater Closes #51. The updater works with pre-packaged binaries from anaconda.org through the conda-client. See merge request !10
- Loading branch information
Showing
4 changed files
with
506 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright (C) 2014 Dignity Health | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# NO CLINICAL USE. THE SOFTWARE IS NOT INTENDED FOR COMMERCIAL PURPOSES | ||
# AND SHOULD BE USED ONLY FOR NON-COMMERCIAL RESEARCH PURPOSES. THE | ||
# SOFTWARE MAY NOT IN ANY EVENT BE USED FOR ANY CLINICAL OR DIAGNOSTIC | ||
# PURPOSES. YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE IS NOT INTENDED FOR | ||
# USE IN ANY HIGH RISK OR STRICT LIABILITY ACTIVITY, INCLUDING BUT NOT | ||
# LIMITED TO LIFE SUPPORT OR EMERGENCY MEDICAL OPERATIONS OR USES. LICENSOR | ||
# MAKES NO WARRANTY AND HAS NOR LIABILITY ARISING FROM ANY USE OF THE | ||
# SOFTWARE IN ANY HIGH RISK OR STRICT LIABILITY ACTIVITIES. | ||
|
||
import sys, os | ||
|
||
# Check for Anaconda PREFIX, or assume that THIS file location is the CWD. | ||
GPI_PREFIX = '/opt/anaconda1anaconda2anaconda3' # ANACONDA | ||
if GPI_PREFIX == '/opt/'+''.join(['anaconda'+str(i) for i in range(1,4)]): | ||
GPI_PREFIX, _ = os.path.split(os.path.dirname(os.path.realpath(__file__))) | ||
|
||
GPI_LIB_DIR = os.path.join(GPI_PREFIX, 'lib') | ||
if GPI_LIB_DIR not in sys.path: | ||
sys.path.insert(0, GPI_LIB_DIR) | ||
|
||
# gpi | ||
from gpi import update | ||
|
||
if __name__ == '__main__': | ||
update.update() |
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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (C) 2014 Dignity Health | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# NO CLINICAL USE. THE SOFTWARE IS NOT INTENDED FOR COMMERCIAL PURPOSES | ||
# AND SHOULD BE USED ONLY FOR NON-COMMERCIAL RESEARCH PURPOSES. THE | ||
# SOFTWARE MAY NOT IN ANY EVENT BE USED FOR ANY CLINICAL OR DIAGNOSTIC | ||
# PURPOSES. YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE IS NOT INTENDED FOR | ||
# USE IN ANY HIGH RISK OR STRICT LIABILITY ACTIVITY, INCLUDING BUT NOT | ||
# LIMITED TO LIFE SUPPORT OR EMERGENCY MEDICAL OPERATIONS OR USES. LICENSOR | ||
# MAKES NO WARRANTY AND HAS NOR LIABILITY ARISING FROM ANY USE OF THE | ||
# SOFTWARE IN ANY HIGH RISK OR STRICT LIABILITY ACTIVITIES. | ||
|
||
# A quick way to spawn a thread for function objects and bound methods | ||
# Example: | ||
# ExecRunnable(Runnable(<myfunc>)) | ||
|
||
from gpi import QtCore | ||
|
||
def ExecRunnable(runnable): | ||
tp = QtCore.QThreadPool.globalInstance() | ||
tp.start(runnable) | ||
|
||
class Runnable(QtCore.QRunnable): | ||
def __init__(self, func): | ||
super().__init__() | ||
self.run = func | ||
self.setAutoDelete(True) |
Oops, something went wrong.