Skip to content

Commit

Permalink
Trying to fix the bps_gui.spec file that I somehow messed up.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkibele committed Nov 2, 2015
2 parents 5e6bebe + 0e6a5ed commit 8ea77f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 10 additions & 2 deletions bps_package/bps_gui.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# -*- mode: python -*-
a = Analysis(['bps_gui.py', 'bps_gui.spec'],

# I'm manually copying the gdal_data, docs, and test_data dirs
# after running pyinstaller. !NOTE!: must be 'gdal_data', not
# 'gdal-data'. In theory, I could modify this
# spec file to make that happen but it's easier this way for now.

# $ pyinstaller bps_gui.spec

a = Analysis(['bps_gui.py'],
pathex=['C:\\Users\\jkibele\\benthic_photo_survey\\bps_package'],
hiddenimports=[],
hiddenimports=['scipy.special._ufuncs_cxx'],
hookspath=None,
runtime_hooks=None)
pyz = PYZ(a.pure)
Expand Down
5 changes: 4 additions & 1 deletion bps_package/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def make_aware_of_local_tz(unaware):
"""Make an unaware time object aware of the local time zone. This tries to
get the timezone from settings."""
settings = QSettings(CONF_QSETTINGS_DEVELOPER,CONF_QSETTINGS_APPLICATION)
local_zone_str = str( settings.value('timezone',LOCAL_TIME_ZONE).toString() )
try:
local_zone_str = str( settings.value('timezone',LOCAL_TIME_ZONE).toString() )
except AttributeError:
local_zone_str = str( settings.value('timezone',LOCAL_TIME_ZONE) )
# LOCAL_TIME_ZONE is from configuration.py
local_zone = pytz.timezone(local_zone_str)
return local_zone.localize(unaware)
Expand Down

0 comments on commit 8ea77f7

Please sign in to comment.