diff --git a/docs/source/detailed_installation.rst b/docs/source/detailed_installation.rst index d05dae4..f015612 100644 --- a/docs/source/detailed_installation.rst +++ b/docs/source/detailed_installation.rst @@ -56,17 +56,13 @@ packages/RPMs/ports/whatever without going through pip. Mac OS X -------- All the necessary packages are available to use glymur with Python 3.3 via -MacPorts. A minimal set of ports includes +MacPorts. You should install the following set of ports: * python33 * py33-numpy * py33-distribute - -To run all the testing, one of the following combinations of ports must -additionally be installed: - - * py33-scikit-image and either py33-Pillow or freeimage - * py33-matplotlib and py33-Pillow + * py33-matplotlib (optional, for running certain tests) + * py33-Pillow (optional, for running certain tests) MacPorts supplies both OpenJPEG 1.5.0 and OpenJPEG 2.0.0. As previously mentioned, the 2.0.0 official release is not supported (although the 2.0+ @@ -98,15 +94,9 @@ meet the minimal set of requirements for running glymur. * python3-matplotlib (for running tests) * python3-matplotlib-tk (or whichever matplotlib backend you prefer) -A few tests still will not run, however, unless one of the following -combinations of RPMs / Python packages is installed. - - * scikit-image and either Pillow or freeimage - * matplotlib and Pillow - -The 2nd route is probably the easiest, so go ahead and install Pillow -via pip since Pillow is not yet available in Fedora 18 default -repositories:: +Pillow is also needed in order to run the maximum number of tests, so +go ahead and install Pillow via pip since Pillow is not yet available +in Fedora 18 default repositories:: $ yum install python3-devel # pip needs this in order to compile Pillow $ yum install python3-pip @@ -115,8 +105,7 @@ repositories:: Fedora 17 ''''''''' -Fedora 17 ships with Python 3.2 and 2.7, but OpenJPEG is only at version 1.4, -so these steps detail working with Python 2.7 and the svn version of OpenJPEG. +Fedora 17 ships with Python 2.7 and OpenJPEG 1.4. Required RPMs include:: @@ -137,11 +126,8 @@ combinations of RPMs / Python packages is installed. scikit-image was not available in the Fedora 17 default repositories, but it was installable via pip:: - $ yum install Cython # pip needs this in order to compile scikit-image - $ yum install python-devel # pip needs this in order to compile scikit-image - $ yum install freeimage # scikit-image uses this as a backend - $ yum install scipy # needed by scikit-image - $ pip-python install scikit-image --user + $ yum install python-devel # pip needs this in order to compile Pillow + $ pip-python3 install Pillow --user $ pip-python install contextlib2 --user $ export PYTHONPATH=$HOME/.local/lib/python2.7/site-packages:$PYTHONPATH diff --git a/glymur/test/test_opj_suite_neg.py b/glymur/test/test_opj_suite_neg.py index 0ab82ce..17962f7 100644 --- a/glymur/test/test_opj_suite_neg.py +++ b/glymur/test/test_opj_suite_neg.py @@ -19,30 +19,15 @@ import pkg_resources from glymur.lib import openjp2 as opj2 -# Need some combination of matplotlib, PIL, or scikits-image for reading -# other image formats. -no_read_backend = True -msg = "Either scikit-image with the freeimage backend or matplotlib " -msg += "with the PIL backend must be available in order to run the " +msg = "Matplotlib with the PIL backend must be available in order to run the " msg += "tests in this suite." no_read_backend_msg = msg try: - import skimage.io - try: - skimage.io.use_plugin('freeimage') - from skimage.io import imread - no_read_backend = False - except RuntimeError: - skimage.io.use_plugin('PIL') - from skimage.io import imread - no_read_backend = False + from PIL import Image + from matplotlib.pyplot import imread + no_read_backend = False except: - try: - from PIL import Image - from matplotlib.pyplot import imread - no_read_backend = False - except: - pass + no_read_backend = True from glymur import Jp2k import glymur diff --git a/glymur/test/test_opj_suite_write.py b/glymur/test/test_opj_suite_write.py index dbb2282..e5be51a 100644 --- a/glymur/test/test_opj_suite_write.py +++ b/glymur/test/test_opj_suite_write.py @@ -19,30 +19,15 @@ import numpy as np from glymur.lib import openjp2 as opj2 -# Need some combination of matplotlib, PIL, or scikits-image for reading -# other image formats. -no_read_backend = True -msg = "Either scikit-image with the freeimage backend or matplotlib " -msg += "with the PIL backend must be available in order to run the " +msg = "Matplotlib with the PIL backend must be available in order to run the " msg += "tests in this suite." no_read_backend_msg = msg try: - import skimage.io - try: - skimage.io.use_plugin('freeimage') - from skimage.io import imread - no_read_backend = False - except RuntimeError: - skimage.io.use_plugin('PIL') - from skimage.io import imread - no_read_backend = False + from PIL import Image + from matplotlib.pyplot import imread + no_read_backend = False except: - try: - from PIL import Image - from matplotlib.pyplot import imread - no_read_backend = False - except: - pass + no_read_backend = True from glymur import Jp2k import glymur diff --git a/setup.py b/setup.py index b4379c2..6a950dc 100644 --- a/setup.py +++ b/setup.py @@ -13,9 +13,10 @@ kwargs = {'name': 'Glymur', 'package_data': {'glymur': ['data/*.jp2', 'data/*.j2k']}, 'scripts': ['bin/jp2dump'], 'license': 'LICENSE.txt', + 'test_suite': 'glymur.test', 'platforms': ['darwin']} -instllrqrs = ['numpy>1.6.2'] +instllrqrs = ['numpy>=1.4.1'] if sys.hexversion < 0x03030000: instllrqrs.append('contextlib2>=0.4') instllrqrs.append('mock>=1.0.1')