diff --git a/CHANGES.txt b/CHANGES.txt index 8461f8e..b6441a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +Jul 27, 2013 - v0.2.8 Fixed inconsistency regarding configuration + file directory on windows (issue91). + Jul 25, 2013 - v0.2.7 Warns but no longer errors out when neither library is found (issue89). diff --git a/docs/source/conf.py b/docs/source/conf.py index b501034..0225ce8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -78,7 +78,7 @@ copyright = u'2013, John Evans' # The short X.Y version. version = '0.2' # The full version, including alpha/beta/rc tags. -release = '0.2.7' +release = '0.2.8' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/detailed_installation.rst b/docs/source/detailed_installation.rst index b737843..165868f 100644 --- a/docs/source/detailed_installation.rst +++ b/docs/source/detailed_installation.rst @@ -1,5 +1,5 @@ ---------------------------------- -Detailed Installation Instructions +Advanced Installation Instructions ---------------------------------- '''''''''''''''''''''' @@ -30,8 +30,22 @@ configparser module, i.e. :: openjp2: /opt/openjp2-svn/lib/libopenjp2.so This assumes, of course, that you've installed OpenJPEG into -/opt/openjp2-svn on a linux system. You may also substitute -**$XDG_CONFIG_HOME** for **$HOME/.config**. +/opt/openjp2-svn on a linux system. The location of the configuration file +is platform-dependent (of course). If you use either linux or mac, the path +to the configuration file would normally be :: + + $HOME/.config/glymur/glymurrc + +but if you have **$XDG_CONFIG_HOME** defined, the path will be :: + + $XDG_CONFIG_HOME/glymur/glymurrc + +On windows, the path to the configuration file can be determined by starting up Python +and typing :: + + import os + os.path.join(os.path.expanduser('~'), 'glymur', 'glymurrc') + You may also include a line for the version 1.x openjpeg library if you have it installed in a non-standard place, i.e. :: @@ -124,12 +138,11 @@ In addition, you must install contextlib2 and Pillow via pip. :: Windows ------- -The only configuration I've tested is Python(xy), which uses Python 2.7. -Python(xy) already comes with numpy, but you will have to install pip and then -contextlib2 and mock as well. Glymur seems to work with both 1.5.1 and the -svn development versions of openjpeg. +I would recommend using WinPython, but Python(xy) also seems to work. WinPython 3.3 +should work with no additional installations required, but 2.7 versions still require +contextlib2 and mock to be installed via pip. -Glymur has been tested **far less** extensively on Windows than on the other +Glymur has been tested far less extensively on Windows than on the other platforms. @@ -141,7 +154,7 @@ There are two environment variables you may wish to set before running the tests. * **OPJ_DATA_ROOT** - points to directory for OpenJPEG test data - * **FORMAT_CORPUS_ROOT** - points to directory for format-corpus repository (see https://github.com/openplanets/format-corpus) + * **FORMAT_CORPUS_ROOT** - points to directory for format-corpus repository (see https://github.com/openplanets/format-corpus if you wish, but you really don't need to bother with this) Setting these two environment variables is not required, as any tests using either of them will be skipped. diff --git a/glymur/lib/config.py b/glymur/lib/config.py index 7fcaeb6..764934e 100644 --- a/glymur/lib/config.py +++ b/glymur/lib/config.py @@ -143,10 +143,10 @@ def get_configdir(): if 'XDG_CONFIG_HOME' in os.environ: return os.path.join(os.environ['XDG_CONFIG_HOME'], 'glymur') - if 'HOME' in os.environ: + if 'HOME' in os.environ and os.name != 'nt': + # HOME is set by WinPython to something unusual, so we don't + # necessarily want that. return os.path.join(os.environ['HOME'], '.config', 'glymur') - if 'USERPROFILE' in os.environ: - # Windows? - return os.path.join(os.environ['USERPROFILE'], 'Application Data', - 'glymur') + # Last stand. Should handle windows... others? + return os.path.join(os.path.expanduser('~'), 'glymur') diff --git a/setup.py b/setup.py index 52df311..b611908 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages import sys kwargs = {'name': 'Glymur', - 'version': '0.2.7', + 'version': '0.2.8', 'description': 'Tools for accessing JPEG2000 files', 'long_description': open('README.md').read(), 'author': 'John Evans',