Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mac issues: more aggressive about specifying location of jpeg and tif…

…f libraries, disable gui tests for mac, allow repeated unregistering in preferences, more logging in saveimages
  • Loading branch information...
commit e76a62497149823b2488f0193ec10e841f6812ec 1 parent 22642a6
@LeeKamentsky LeeKamentsky authored
View
439 cellprofiler/gui/tests/test_cpfigure.py
@@ -14,6 +14,7 @@
__version__="$Revision$"
import numpy as np
+import sys
import time
import unittest
@@ -24,233 +25,233 @@
import cellprofiler.gui.cpfigure as cpfig
-
-class TestCPFigure(unittest.TestCase):
- def setUp(self):
- self.app = wx.GetApp()
- if self.app is None:
- self.app = wx.PySimpleApp(True)
- self.frame = wx.Frame(None, title="Hello, world")
- self.frame.Show()
-
- def test_01_01_imshow_raw(self):
- '''Make sure the image drawn by imshow matches the input image.'''
- image = np.zeros((100, 100))
- for y in range(image.shape[0]):
- image[y,:] = y / 200.0
- my_frame = cpfig.create_or_find(self.frame, -1, subplots=(1,1),
- name="test_01_01_imshow_raw")
- ax = my_frame.subplot_imshow(0, 0, image, normalize=False)
- # assert (((ax.get_array()-image) < 0.000001).all()), 'Monochrome input image did not match subplot image.'
- my_frame.Destroy()
-
- def test_01_02_imshow_raw_rgb(self):
- '''Make sure the image drawn by imshow matches the input RGB image.'''
- image = np.zeros((100, 100, 3))
- for y in range(image.shape[0]):
- image[y,:,:] = y / 200.0
- my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
- name = "test_01_02_imshow_raw_rgb")
- ax = my_frame.subplot_imshow(0, 0, image, normalize=False)
- # shown_im = ax.get_array().astype(float) / 255.0
- # np.testing.assert_almost_equal(shown_im, image, decimal=2)
- my_frame.Destroy()
-
- def test_01_03_imshow_normalized(self):
- '''Make sure the image drawn by imshow is normalized.'''
- image = np.zeros((100, 100))
- for y in range(image.shape[0]):
- image[y,:] = y / 200.0
- my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
- name = "test_01_03_imshow_normalized")
- ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
-
- normed = ((image - np.min(image)) / np.max(image))
- # np.testing.assert_almost_equal(ax.get_array(), normed, decimal=2)
- my_frame.Destroy()
-
- def test_01_04_imshow_normalized_rgb(self):
- '''Make sure the RGB image drawn by imshow is normalized.'''
- image = np.zeros((100, 100, 3))
- for y in range(image.shape[0]):
- image[y,:,:] = y / 200.0
- my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
- name="test_01_04_imshow_normalized_rgb")
- ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
-
- normed = ((image - np.min(image)) / np.max(image))
- # shown_im = ax.get_array().astype(float) / 255.0
- # np.testing.assert_almost_equal(normed, shown_im, decimal=2)
- my_frame.Destroy()
-
- def test_01_05_imshow_log_normalized(self):
- '''Make sure the image drawn by imshow is log normalized.'''
- image = np.zeros((100, 100))
- for y in range(image.shape[0]):
- image[y,:] = y / 200.0
- my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
- name = "test_01_05_imshow_log_normalized")
- ax = my_frame.subplot_imshow(0, 0, image, normalize='log')
-
- (min, max) = (image[image > 0].min(), image.max())
- normed = (np.log(image.clip(min, max)) - np.log(min)) / (np.log(max) - np.log(min))
- # np.testing.assert_almost_equal(normed, ax.get_array(), decimal=2)
- my_frame.Destroy()
-
- def test_01_06_imshow_log_normalized_rgb(self):
- '''Make sure the RGB image drawn by imshow is log normalized.'''
- image = np.zeros((100, 100, 3))
- for y in range(image.shape[0]):
- image[y,:] = y / 200.0
- my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
- name="test_01_06_imshow_log_normalized_rgb")
- ax = my_frame.subplot_imshow(0, 0, image, normalize='log')
-
- (min, max) = (image[image > 0].min(), image.max())
- normed = (np.log(image.clip(min, max)) - np.log(min)) / (np.log(max) - np.log(min))
- # shown_im = ax.get_array().astype(float) / 255.0
- # np.testing.assert_almost_equal(normed, shown_im, decimal=2)
- my_frame.Destroy()
-
- def test_02_01_show_pixel_data(self):
- '''Make sure the values reported by show_pixel_data are the raw image
- values for grayscale images.'''
- image = np.zeros((100, 100))
- for y in range(image.shape[0]):
- image[y,:] = y / 200.0
- my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
- name="test_02_01_show_pixel_data")
- ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
-
- evt = matplotlib.backend_bases.MouseEvent('motion_notify_event',
- ax.figure.canvas,
- x=0, y=10)
- evt.xdata = 0
- evt.ydata = 10
- evt.inaxes = my_frame.subplot(0, 0)
- my_frame.on_mouse_move_show_pixel_data(evt, 0, 0, 0, 0)
- expected = "Intensity: %.4f"%(evt.ydata / 200.0)
- assert expected in [str(f) for f in my_frame.status_bar.GetFields()], 'Did not find "%s" in StatusBar fields'%(expected)
- my_frame.Destroy()
-
- def test_02_02_show_pixel_data_rgb(self):
- '''Make sure the values reported by show_pixel_data are the raw image
- values for RGB images.'''
- image = np.zeros((100, 100, 3))
- for y in range(image.shape[0]):
- image[y,:,:] = y / 200.0
- image[:,:,1] = image[:,:,1] / 2.
- image[:,:,2] = image[:,:,2] / 4.
- my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
- name="test_02_02_show_pixel_data_rgb")
- ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
-
- evt = matplotlib.backend_bases.MouseEvent('motion_notify_event',
- ax.figure.canvas,
- x=0, y=10)
- evt.xdata = 0
- evt.ydata = 10
- evt.inaxes = my_frame.subplot(0, 0)
- my_frame.on_mouse_move_show_pixel_data(evt, 0, 0, 0, 0)
- expected = ["Red: %.4f"%(evt.ydata / 200.0),
- "Green: %.4f"%(evt.ydata / 200.0 / 2.),
- "Blue: %.4f"%(evt.ydata / 200.0 / 4.)]
- for field in expected:
- assert field in [str(f) for f in my_frame.status_bar.GetFields()], 'Did not find "%s" in StatusBar fields'%(field)
- my_frame.Destroy()
-
- def test_03_01_menu_order(self):
- '''Make sure that the subplots submenus are presented in the right order
- no matter what order they are drawn in.
- Also tests that the order is not affected after calling clf()'''
- f = cpfig.create_or_find(None, -1, subplots=(4,2),
- name="test_03_01_menu_order")
-
- img = np.random.uniform(.5, .6, size=(5, 5, 3))
-
- f.subplot_histogram(0, 0, [1,1,1,2], 2, title="hist")
- f.subplot_imshow(1, 0, img, "rgb1")
- f.subplot_histogram(2, 0, [1,1,1,2], 2, title="hist")
- f.subplot_imshow(3, 0, img, "rgb2")
-
- f.subplot_imshow(0, 1, img, "rgb3")
- f.subplot_imshow(1, 1, img, "rgb4")
- f.subplot_imshow(2, 1, img, "rgb5")
- f.subplot_histogram(3, 1, [1,1,1,2], 2, title="hist")
+if sys.platform == "win32":
+ class TestCPFigure(unittest.TestCase):
+ def setUp(self):
+ self.app = wx.GetApp()
+ if self.app is None:
+ self.app = wx.PySimpleApp(True)
+ self.frame = wx.Frame(None, title="Hello, world")
+ self.frame.Show()
- for i, item in enumerate(f.menu_subplots.MenuItems):
- assert item.Label == 'rgb%s'%(i+1)
+ def test_01_01_imshow_raw(self):
+ '''Make sure the image drawn by imshow matches the input image.'''
+ image = np.zeros((100, 100))
+ for y in range(image.shape[0]):
+ image[y,:] = y / 200.0
+ my_frame = cpfig.create_or_find(self.frame, -1, subplots=(1,1),
+ name="test_01_01_imshow_raw")
+ ax = my_frame.subplot_imshow(0, 0, image, normalize=False)
+ # assert (((ax.get_array()-image) < 0.000001).all()), 'Monochrome input image did not match subplot image.'
+ my_frame.Destroy()
- f.clf()
-
- assert len(f.menu_subplots.MenuItems) == 0, 'Subplot menus should be empty after clf().'
-
- f.subplot_histogram(3, 1, [1,1,1,2], 2, title="hist")
- f.subplot_imshow(2, 1, img, "rgb5")
- f.subplot_imshow(0, 1, img, "rgb3")
- f.subplot_imshow(1, 1, img, "rgb4")
- f.subplot_histogram(2, 0, [1,1,1,2], 2, title="hist")
- f.subplot_imshow(1, 0, img, "rgb1")
- f.subplot_imshow(3, 0, img, "rgb2")
- f.subplot_histogram(0, 0, [1,1,1,2], 2, title="hist")
+ def test_01_02_imshow_raw_rgb(self):
+ '''Make sure the image drawn by imshow matches the input RGB image.'''
+ image = np.zeros((100, 100, 3))
+ for y in range(image.shape[0]):
+ image[y,:,:] = y / 200.0
+ my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
+ name = "test_01_02_imshow_raw_rgb")
+ ax = my_frame.subplot_imshow(0, 0, image, normalize=False)
+ # shown_im = ax.get_array().astype(float) / 255.0
+ # np.testing.assert_almost_equal(shown_im, image, decimal=2)
+ my_frame.Destroy()
+
+ def test_01_03_imshow_normalized(self):
+ '''Make sure the image drawn by imshow is normalized.'''
+ image = np.zeros((100, 100))
+ for y in range(image.shape[0]):
+ image[y,:] = y / 200.0
+ my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
+ name = "test_01_03_imshow_normalized")
+ ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
+
+ normed = ((image - np.min(image)) / np.max(image))
+ # np.testing.assert_almost_equal(ax.get_array(), normed, decimal=2)
+ my_frame.Destroy()
- for i, item in enumerate(f.menu_subplots.MenuItems):
- assert item.Label == 'rgb%s'%(i+1)
-
- f.Destroy()
-
- def test_03_02_menu_order2(self):
- '''Make sure that the subplots submenus are presented in the right order
- after they are redrawn as a result of menu handlers
- (e.g. change_contrast)'''
- f = cpfig.create_or_find(None, -1, subplots=(2,2),
- name="test_03_02_menu_order2")
-
- img = np.random.uniform(.5, .6, size=(5, 5, 3))
-
- f.subplot_histogram(0, 0, [1,1,1,2], 2, title="hist")
- f.subplot_imshow(1, 0, img, "rgb1")
- f.subplot_imshow(0, 1, img, "rgb2")
- f.subplot_imshow(1, 1, img, "rgb3")
+ def test_01_04_imshow_normalized_rgb(self):
+ '''Make sure the RGB image drawn by imshow is normalized.'''
+ image = np.zeros((100, 100, 3))
+ for y in range(image.shape[0]):
+ image[y,:,:] = y / 200.0
+ my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
+ name="test_01_04_imshow_normalized_rgb")
+ ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
+
+ normed = ((image - np.min(image)) / np.max(image))
+ # shown_im = ax.get_array().astype(float) / 255.0
+ # np.testing.assert_almost_equal(normed, shown_im, decimal=2)
+ my_frame.Destroy()
- for i, item in enumerate(f.menu_subplots.MenuItems):
- assert item.Label == 'rgb%s'%(i+1)
+ def test_01_05_imshow_log_normalized(self):
+ '''Make sure the image drawn by imshow is log normalized.'''
+ image = np.zeros((100, 100))
+ for y in range(image.shape[0]):
+ image[y,:] = y / 200.0
+ my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
+ name = "test_01_05_imshow_log_normalized")
+ ax = my_frame.subplot_imshow(0, 0, image, normalize='log')
- menu = f.get_imshow_menu((1,0))
- for item in menu.MenuItems:
- if item.Label == 'Image contrast':
- for item in item.SubMenu.MenuItems:
- if item.Label == 'Raw':
- event = wx.PyCommandEvent(wx.EVT_MENU.typeId, item.Id)
- f.GetEventHandler().ProcessEvent(event)
- self.app.ProcessPendingEvents()
+ (min, max) = (image[image > 0].min(), image.max())
+ normed = (np.log(image.clip(min, max)) - np.log(min)) / (np.log(max) - np.log(min))
+ # np.testing.assert_almost_equal(normed, ax.get_array(), decimal=2)
+ my_frame.Destroy()
- for i, item in enumerate(f.menu_subplots.MenuItems):
- assert item.Label == 'rgb%s'%(i+1)
+ def test_01_06_imshow_log_normalized_rgb(self):
+ '''Make sure the RGB image drawn by imshow is log normalized.'''
+ image = np.zeros((100, 100, 3))
+ for y in range(image.shape[0]):
+ image[y,:] = y / 200.0
+ my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
+ name="test_01_06_imshow_log_normalized_rgb")
+ ax = my_frame.subplot_imshow(0, 0, image, normalize='log')
- menu = f.get_imshow_menu((1,1))
- for item in menu.MenuItems:
- if item.Label == 'Image contrast':
- for item in item.SubMenu.MenuItems:
- if item.Label == 'Log normalized':
- event = wx.PyCommandEvent(wx.EVT_MENU.typeId, item.Id)
- f.GetEventHandler().ProcessEvent(event)
- self.app.ProcessPendingEvents()
+ (min, max) = (image[image > 0].min(), image.max())
+ normed = (np.log(image.clip(min, max)) - np.log(min)) / (np.log(max) - np.log(min))
+ # shown_im = ax.get_array().astype(float) / 255.0
+ # np.testing.assert_almost_equal(normed, shown_im, decimal=2)
+ my_frame.Destroy()
- for i, item in enumerate(f.menu_subplots.MenuItems):
- assert item.Label == 'rgb%s'%(i+1)
+ def test_02_01_show_pixel_data(self):
+ '''Make sure the values reported by show_pixel_data are the raw image
+ values for grayscale images.'''
+ image = np.zeros((100, 100))
+ for y in range(image.shape[0]):
+ image[y,:] = y / 200.0
+ my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
+ name="test_02_01_show_pixel_data")
+ ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
- menu = f.get_imshow_menu((0,1))
- for item in menu.MenuItems:
- if item.Label == 'Channels':
- for item in item.SubMenu.MenuItems:
- if item.Label == cpfig.COLOR_NAMES[0]:
- event = wx.PyCommandEvent(wx.EVT_MENU.typeId, item.Id)
- f.GetEventHandler().ProcessEvent(event)
- self.app.ProcessPendingEvents()
-
- for i, item in enumerate(f.menu_subplots.MenuItems):
- assert item.Label == 'rgb%s'%(i+1)
- f.Destroy()
+ evt = matplotlib.backend_bases.MouseEvent('motion_notify_event',
+ ax.figure.canvas,
+ x=0, y=10)
+ evt.xdata = 0
+ evt.ydata = 10
+ evt.inaxes = my_frame.subplot(0, 0)
+ my_frame.on_mouse_move_show_pixel_data(evt, 0, 0, 0, 0)
+ expected = "Intensity: %.4f"%(evt.ydata / 200.0)
+ assert expected in [str(f) for f in my_frame.status_bar.GetFields()], 'Did not find "%s" in StatusBar fields'%(expected)
+ my_frame.Destroy()
+
+ def test_02_02_show_pixel_data_rgb(self):
+ '''Make sure the values reported by show_pixel_data are the raw image
+ values for RGB images.'''
+ image = np.zeros((100, 100, 3))
+ for y in range(image.shape[0]):
+ image[y,:,:] = y / 200.0
+ image[:,:,1] = image[:,:,1] / 2.
+ image[:,:,2] = image[:,:,2] / 4.
+ my_frame = cpfig.create_or_find(None, -1, subplots=(1,1),
+ name="test_02_02_show_pixel_data_rgb")
+ ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
+
+ evt = matplotlib.backend_bases.MouseEvent('motion_notify_event',
+ ax.figure.canvas,
+ x=0, y=10)
+ evt.xdata = 0
+ evt.ydata = 10
+ evt.inaxes = my_frame.subplot(0, 0)
+ my_frame.on_mouse_move_show_pixel_data(evt, 0, 0, 0, 0)
+ expected = ["Red: %.4f"%(evt.ydata / 200.0),
+ "Green: %.4f"%(evt.ydata / 200.0 / 2.),
+ "Blue: %.4f"%(evt.ydata / 200.0 / 4.)]
+ for field in expected:
+ assert field in [str(f) for f in my_frame.status_bar.GetFields()], 'Did not find "%s" in StatusBar fields'%(field)
+ my_frame.Destroy()
+
+ def test_03_01_menu_order(self):
+ '''Make sure that the subplots submenus are presented in the right order
+ no matter what order they are drawn in.
+ Also tests that the order is not affected after calling clf()'''
+ f = cpfig.create_or_find(None, -1, subplots=(4,2),
+ name="test_03_01_menu_order")
+
+ img = np.random.uniform(.5, .6, size=(5, 5, 3))
+ f.subplot_histogram(0, 0, [1,1,1,2], 2, title="hist")
+ f.subplot_imshow(1, 0, img, "rgb1")
+ f.subplot_histogram(2, 0, [1,1,1,2], 2, title="hist")
+ f.subplot_imshow(3, 0, img, "rgb2")
+
+ f.subplot_imshow(0, 1, img, "rgb3")
+ f.subplot_imshow(1, 1, img, "rgb4")
+ f.subplot_imshow(2, 1, img, "rgb5")
+ f.subplot_histogram(3, 1, [1,1,1,2], 2, title="hist")
+
+ for i, item in enumerate(f.menu_subplots.MenuItems):
+ assert item.Label == 'rgb%s'%(i+1)
+
+ f.clf()
+
+ assert len(f.menu_subplots.MenuItems) == 0, 'Subplot menus should be empty after clf().'
+
+ f.subplot_histogram(3, 1, [1,1,1,2], 2, title="hist")
+ f.subplot_imshow(2, 1, img, "rgb5")
+ f.subplot_imshow(0, 1, img, "rgb3")
+ f.subplot_imshow(1, 1, img, "rgb4")
+ f.subplot_histogram(2, 0, [1,1,1,2], 2, title="hist")
+ f.subplot_imshow(1, 0, img, "rgb1")
+ f.subplot_imshow(3, 0, img, "rgb2")
+ f.subplot_histogram(0, 0, [1,1,1,2], 2, title="hist")
+
+ for i, item in enumerate(f.menu_subplots.MenuItems):
+ assert item.Label == 'rgb%s'%(i+1)
+
+ f.Destroy()
+
+ def test_03_02_menu_order2(self):
+ '''Make sure that the subplots submenus are presented in the right order
+ after they are redrawn as a result of menu handlers
+ (e.g. change_contrast)'''
+ f = cpfig.create_or_find(None, -1, subplots=(2,2),
+ name="test_03_02_menu_order2")
+
+ img = np.random.uniform(.5, .6, size=(5, 5, 3))
+
+ f.subplot_histogram(0, 0, [1,1,1,2], 2, title="hist")
+ f.subplot_imshow(1, 0, img, "rgb1")
+ f.subplot_imshow(0, 1, img, "rgb2")
+ f.subplot_imshow(1, 1, img, "rgb3")
+
+ for i, item in enumerate(f.menu_subplots.MenuItems):
+ assert item.Label == 'rgb%s'%(i+1)
+
+ menu = f.get_imshow_menu((1,0))
+ for item in menu.MenuItems:
+ if item.Label == 'Image contrast':
+ for item in item.SubMenu.MenuItems:
+ if item.Label == 'Raw':
+ event = wx.PyCommandEvent(wx.EVT_MENU.typeId, item.Id)
+ f.GetEventHandler().ProcessEvent(event)
+ self.app.ProcessPendingEvents()
+
+ for i, item in enumerate(f.menu_subplots.MenuItems):
+ assert item.Label == 'rgb%s'%(i+1)
+
+ menu = f.get_imshow_menu((1,1))
+ for item in menu.MenuItems:
+ if item.Label == 'Image contrast':
+ for item in item.SubMenu.MenuItems:
+ if item.Label == 'Log normalized':
+ event = wx.PyCommandEvent(wx.EVT_MENU.typeId, item.Id)
+ f.GetEventHandler().ProcessEvent(event)
+ self.app.ProcessPendingEvents()
+
+ for i, item in enumerate(f.menu_subplots.MenuItems):
+ assert item.Label == 'rgb%s'%(i+1)
+
+ menu = f.get_imshow_menu((0,1))
+ for item in menu.MenuItems:
+ if item.Label == 'Channels':
+ for item in item.SubMenu.MenuItems:
+ if item.Label == cpfig.COLOR_NAMES[0]:
+ event = wx.PyCommandEvent(wx.EVT_MENU.typeId, item.Id)
+ f.GetEventHandler().ProcessEvent(event)
+ self.app.ProcessPendingEvents()
+
+ for i, item in enumerate(f.menu_subplots.MenuItems):
+ assert item.Label == 'rgb%s'%(i+1)
+ f.Destroy()
+
View
2  cellprofiler/gui/tests/test_moduleview.py
@@ -27,7 +27,7 @@
from cellprofiler.modules import add_module_for_tst
import sys
-if not sys.platform.startswith('linux'):
+if sys.platform.startswith('win32'):
class TestModuleView(unittest.TestCase):
def set_pipeline(self, module):
View
1  cellprofiler/modules/saveimages.py
@@ -56,6 +56,7 @@
has_tiff = True
except:
if sys.platform == 'darwin':
+ traceback.print_exc()
logger.error("Failed to load pylibtiff. SaveImages on Mac may not be "
"able to write 16-bit TIFF format.")
has_tiff = False
View
9 cellprofiler/preferences.py
@@ -313,7 +313,8 @@ def remove_image_directory_listener(listener):
"""Remove a previously-added image directory listener
"""
- __image_directory_listeners.remove(listener)
+ if listener in __image_directory_listeners:
+ __image_directory_listeners.remove(listener)
class PreferenceChangedEvent:
def __init__(self, new_value):
@@ -363,7 +364,8 @@ def remove_output_directory_listener(listener):
"""Remove a previously-added image directory listener
"""
- __output_directory_listeners.remove(listener)
+ if listener in __output_directory_listeners:
+ __output_directory_listeners.remove(listener)
def get_title_font_size():
if not get_config().Exists(TITLE_FONT_SIZE):
@@ -577,7 +579,8 @@ def add_run_distributed_listener(listener):
def remove_run_distributed_listener(listener):
"""Remove a previously-added image directory listener
"""
- __run_distributed_listeners.remove(listener)
+ if listener in __run_distributed_listeners:
+ __run_distributed_listeners.remove(listener)
__recent_files = {}
def get_recent_files(category=""):
View
12 setup.py
@@ -18,14 +18,22 @@
import os.path
import glob
from subprocess import call
+import ctypes.util
# fix from
# http://mail.python.org/pipermail/pythonmac-sig/2008-June/020111.html
import pytz
pytz.zoneinfo = pytz.tzinfo
pytz.zoneinfo.UTC = pytz.UTC
-
+#
+# It's necessary to install libtiff and libjpeg explicitly
+# so that libtiff can find itself and so that libjpeg
+# is the one that we want and not the one that WX thinks
+# it wants.
+#
from libtiff.libtiff_ctypes import tiff_h_name
+tiff_dylib = ctypes.util.find_library('tiff')
+jpeg_dylib = ctypes.util.find_library('jpeg')
# make sure external dependencies match requirements
import external_dependencies
@@ -49,7 +57,7 @@
'excludes': ['pylab', 'nose', 'Tkinter', 'Cython', 'scipy.weave'],
'resources': ['CellProfilerIcon.png'],
'iconfile' : 'CellProfilerIcon.icns',
- 'frameworks' : ['libtiff.dylib'],
+ 'frameworks' : [tiff_dylib, jpeg_dylib],
}
if sys.argv[-1] == 'py2app':
Please sign in to comment.
Something went wrong with that request. Please try again.