Index: build_tools/conda_qt5_centos.yml
===================================================================
--- build_tools/conda_qt5_centos.yml	(revision f00d3fd0d10b64107efc92f1182a86be37307d6c)
+++ build_tools/conda_qt5_centos.yml	(revision f00d3fd0d10b64107efc92f1182a86be37307d6c)
@@ -0,0 +1,124 @@
+name: qt5_centos
+channels:
+  - conda-forge
+  - defaults
+dependencies:
+  - altgraph=0.15=py_0
+  - certifi=2018.4.16=py36_0
+  - macholib=1.8=py_0
+  - pycrypto=2.6.1=py36_1
+  - pyinstaller=3.3.1=py36_0
+  - alabaster=0.7.10=py36h306e16b_0
+  - asn1crypto=0.24.0=py36_0
+  - babel=2.5.3=py36_0
+  - backcall=0.1.0=py36_0
+  - ca-certificates=2018.03.07=0
+  - cffi=1.11.5=py36h9745a5d_0
+  - chardet=3.0.4=py36h0f667ec_1
+  - cryptography=2.2.2=py36h14c3975_0
+  - cycler=0.10.0=py36h93f1223_0
+  - dbus=1.13.2=h714fa37_1
+  - decorator=4.3.0=py36_0
+  - docutils=0.14=py36hb0f60f5_0
+  - expat=2.2.5=he0dffb1_0
+  - fontconfig=2.12.6=h49f89f6_0
+  - freetype=2.8=hab7d2ae_1
+  - glib=2.56.1=h000015b_0
+  - gst-plugins-base=1.14.0=hbbd80ab_1
+  - gstreamer=1.14.0=hb453b48_1
+  - h5py=2.7.1=py36h3585f63_0
+  - hdf5=1.10.1=h9caa474_1
+  - icu=58.2=h9c2bf20_1
+  - idna=2.6=py36h82fb2a8_1
+  - imagesize=1.0.0=py36_0
+  - intel-openmp=2018.0.0=8
+  - ipykernel=4.8.2=py36_0
+  - ipython=6.4.0=py36_0
+  - ipython_genutils=0.2.0=py36hb52b0d5_0
+  - jedi=0.12.0=py36_1
+  - jinja2=2.10=py36ha16c418_0
+  - jpeg=9b=h024ee3a_2
+  - jupyter_client=5.2.3=py36_0
+  - jupyter_core=4.4.0=py36h7c827e3_0
+  - kiwisolver=1.0.1=py36h764f252_0
+  - libedit=3.1.20170329=h6b74fdf_2
+  - libffi=3.2.1=hd88cf55_4
+  - libgcc-ng=7.2.0=hdf63c60_3
+  - libgfortran-ng=7.2.0=hdf63c60_3
+  - libpng=1.6.34=hb9fc6fc_0
+  - libsodium=1.0.16=h1bed415_0
+  - libstdcxx-ng=7.2.0=hdf63c60_3
+  - libxcb=1.13=h1bed415_1
+  - libxml2=2.9.8=hf84eae3_0
+  - libxslt=1.1.32=h1312cb7_0
+  - lxml=4.2.1=py36h23eabaa_0
+  - markupsafe=1.0=py36hd9260cd_1
+  - matplotlib=2.2.2=py36h0e671d2_1
+  - mkl=2018.0.2=1
+  - mkl_fft=1.0.1=py36h3010b51_0
+  - mkl_random=1.0.1=py36h629b387_0
+  - ncurses=6.1=hf484d3e_0
+  - numpy=1.14.2=py36hdbf6ddf_1
+  - openssl=1.0.2o=h20670df_0
+  - packaging=17.1=py36_0
+  - parso=0.2.0=py36_0
+  - pcre=8.42=h439df22_0
+  - pexpect=4.5.0=py36_0
+  - pickleshare=0.7.4=py36h63277f8_0
+  - pip=10.0.1=py36_0
+  - prompt_toolkit=1.0.15=py36h17d85b1_0
+  - ptyprocess=0.5.2=py36h69acd42_0
+  - pycparser=2.18=py36hf9f622e_1
+  - pygments=2.2.0=py36h0d3125c_0
+  - pyopenssl=18.0.0=py36_0
+  - pyparsing=2.2.0=py36hee85983_1
+  - pyqt=5.9.2=py36h751905a_0
+  - pysocks=1.6.8=py36_0
+  - python=3.6.5=hc3d631a_2
+  - python-dateutil=2.7.3=py36_0
+  - pytz=2018.4=py36_0
+  - pyzmq=17.0.0=py36h14c3975_0
+  - qt=5.9.5=h7e424d6_0
+  - qtconsole=4.3.1=py36h8f73b5b_0
+  - readline=7.0=ha6073c6_4
+  - requests=2.18.4=py36he2e5f8d_1
+  - scipy=1.1.0=py36hfc37229_0
+  - setuptools=39.1.0=py36_0
+  - simplegeneric=0.8.1=py36_2
+  - sip=4.19.8=py36hf484d3e_0
+  - six=1.11.0=py36h372c433_1
+  - snowballstemmer=1.2.1=py36h6febd40_0
+  - sphinx=1.7.4=py36_0
+  - sphinxcontrib=1.0=py36h6d0f590_1
+  - sphinxcontrib-websupport=1.0.1=py36hb5cb234_1
+  - sqlite=3.23.1=he433501_0
+  - tk=8.6.7=hc745277_3
+  - tornado=5.0.2=py36_0
+  - traitlets=4.3.2=py36h674d592_0
+  - typing=3.6.4=py36_0
+  - urllib3=1.22=py36hbe7ace6_0
+  - wcwidth=0.1.7=py36hdf4376a_0
+  - wheel=0.31.1=py36_0
+  - xz=5.2.4=h14c3975_4
+  - zeromq=4.2.5=h439df22_0
+  - zlib=1.2.11=ha838bed_2
+  - pip:
+    - attrs==18.1.0
+    - automat==0.6.0
+    - bumps==0.7.8
+    - constantly==15.1.0
+    - html5lib==1.0.1
+    - httplib2==0.11.3
+    - hyperlink==18.0.0
+    - incremental==17.5.0
+    - periodictable==1.5.0
+    - pillow==5.1.0
+    - pypdf2==1.26.0
+    - qt5reactor==0.5
+    - reportlab==3.4.0
+    - twisted==18.4.0
+    - webencodings==0.5.1
+    - xhtml2pdf==0.2.2
+    - zope.interface==4.5.0
+
+
Index: installers/sasview_qt5_centos.spec
===================================================================
--- installers/sasview_qt5_centos.spec	(revision f00d3fd0d10b64107efc92f1182a86be37307d6c)
+++ installers/sasview_qt5_centos.spec	(revision f00d3fd0d10b64107efc92f1182a86be37307d6c)
@@ -0,0 +1,193 @@
+# -*- mode: python -*-
+# Modifiable location
+import sys
+import os
+import platform
+
+import warnings
+from distutils.filelist import findall
+
+PYTHON_LOC = sys.exec_prefix
+# Portability settings
+if os.name == 'posix':
+    LIBPREFIX='lib'
+    LIBSUFFIX='so'
+    LIBLOC = os.path.join(PYTHON_LOC,'lib')
+    # Darwin needs UPX=False, Linux actually builds with both...
+    if platform.system() == 'Darwin':
+        UPX=False
+    else:
+        UPX=True
+else:
+    LIBPREFIX=''
+    LIBSUFFIX='dll'
+    LIBLOC = os.path.join(PYTHON_LOC,'Library','bin')
+    UPX=True
+
+SCRIPT_TO_SOURCE = 'sasview.py'
+
+# Warning! pyinstaller/py2exe etc. don't have the __file__ attribute
+WORK_DIR = os.path.dirname(os.path.realpath(sys.argv[0]))
+
+#### LOCAL METHODS
+def add_data(data):
+    for component in data:
+        target = component[0]
+        for filename in component[1]:
+           datas.append((filename, target))
+
+def add_binary(binary):
+    return (os.path.join(LIBLOC,binary),'.')
+
+# ADDITIONAL DATA ############################################################
+datas = [('../src/sas/sasview/images', 'images')]
+
+# datas = [('../src/sas/sasview/images/ball.png', '.')]
+datas = [('../src/sas/sasview/images/ball.ico', '.')]
+
+
+datas.append(('../src/sas/sasview/media','media'))
+datas.append(('../src/sas/sasview/test','test'))
+datas.append(('../src/sas/sasview/custom_config.py','.'))
+datas.append(('../src/sas/sasview/local_config.py','.'))
+# TRN COMMENT OUT
+#datas.append(('../src/sas/sasview/wxcruft.py','.'))
+datas.append(('../src/sas/logger_config.py','.'))
+datas.append(('../src/sas/logging.ini','.'))
+
+# pyinstaller gets mightily confused by upper/lower case,
+# so some modules need to be copied explicitly to avoid
+# messages like
+# WARNING: Attempted to add Python module twice with different upper/lowercases
+# TRN COMMENT OsUT
+# datas.append((os.path.join(PYTHON_LOC,'Lib','SocketServer.py'),'.'))
+# datas.append((os.path.join(PYTHON_LOC,'Lib','Queue.py'),'.'))
+
+# TODO
+# NEED BETTER WAY TO DEAL WITH THESE RELATIVE PATHS
+datas.append((os.path.join('..', '..','sasmodels','sasmodels'),'sasmodels'))
+datas.append((os.path.join('..', 'src','sas','sasgui','perspectives','fitting','plugin_models'),'plugin_models'))
+
+# TRN COMMENT OUT 
+# datas.append((os.path.join(PYTHON_LOC,'Library','plugins','platforms'),'platforms'))
+#sdatas.append((os.path.join(PYTHON_LOC,'Lib','site-packages','zmq','libzmq.cp36-win_amd64.pyd'),'.'))
+
+# These depend on whether we have MKL or Atlas numpy
+if os.path.exists(os.path.join(LIBLOC, LIBPREFIX + 'mkl_core.' + LIBSUFFIX)):
+    datas.append(add_binary(LIBPREFIX + 'mkl_avx2.' + LIBSUFFIX))
+    datas.append(add_binary(LIBPREFIX + 'mkl_def.' + LIBSUFFIX))
+elif os.path.exists(os.path.join(LIBLOC, LIBPREFIX + 'numpy-atlas.' + LIBSUFFIX)):
+    datas.append(add_binary(LIBPREFIX + 'numpy-atlas.' + LIBSUFFIX))
+else:
+    raise Exception("No numerical library for numpy found.")
+
+#import sas.sascalc.dataloader.readers
+#f = os.path.join(sas.sascalc.dataloader.readers.get_data_path(), 'defaults.json')
+#datas.append((f, '.'))
+
+# # Add a custom pyopencl hook, as described in
+# # https://github.com/pyinstaller/pyinstaller/issues/2130
+# from PyInstaller.utils.hooks import copy_metadata
+# datas.append(copy_metadata('pyopencl')[0])
+
+import sasmodels
+add_data(sasmodels.data_files())
+
+try:
+    import tinycc
+    add_data(tinycc.data_files())
+except ImportError:
+    warnings.warn("TinyCC package is not available and will not be included")
+
+import periodictable
+add_data(periodictable.data_files())
+
+import matplotlib
+matplotlibdatadir = matplotlib.get_data_path()
+matplotlibdata = findall(matplotlibdatadir)
+for f in matplotlibdata:
+    dirname = os.path.join('mpl-data', f[len(matplotlibdatadir)+1:])
+    datas.append((f, os.path.split(dirname)[0]))
+
+binaries = []
+
+# EXCLUDED FILES ############################################################
+# Spelled out to enable easier editing
+excludes = []
+
+# Need to explicitly exclude sasmodels here!!
+excludes.append('sasmodels')
+
+# HIDDEN MODULES ############################################################
+hiddenimports = [
+ 'PyQt5',
+ 'periodictable.core',
+ 'sasmodels.core',
+  #'pyopencl',
+  #'tinycc',
+  #'SocketServer',
+ 'logging',
+ 'logging.config',
+ 'reportlab', 'reportlab.graphics',
+ 'reportlab.graphics.barcode.common',
+ 'reportlab.graphics.barcode.code128',
+ 'reportlab.graphics.barcode.code93',
+ 'reportlab.graphics.barcode.code39',
+ 'reportlab.graphics.barcode.lto',
+ 'reportlab.graphics.barcode.qr',
+ 'reportlab.graphics.barcode.usps',
+ 'reportlab.graphics.barcode.usps4s',
+ 'reportlab.graphics.barcode.eanbc',
+ 'reportlab.graphics.barcode.ecc200datamatrix',
+ 'reportlab.graphics.barcode.fourstate',
+ 'ipykernel', 'ipykernel.datapub',
+ 'pygments', 'pygments.lexers','pygments.lexers.python',
+ 'pygments.styles','pygments.styles.default',
+ 'atexit', 'cython', 'sip', 'xhtml2pdf',
+ 'zmq', 'zmq.utils', 'zmq.utils.strtypes',
+ 'zmq.utils.jsonapi','zmq.utils.garbage',
+ 'zmq.backend.cython','zmq.backend.cffi',
+ 'site','lxml._elementpath','lxml.etree',
+ 'scipy._lib.messagestream',
+]
+
+a = Analysis([SCRIPT_TO_SOURCE],
+             pathex=[WORK_DIR],
+             binaries=binaries,
+             datas=datas,
+             hiddenimports=hiddenimports,
+             hookspath=[],
+             runtime_hooks=[],
+             excludes=excludes,
+             win_no_prefer_redirects=False,
+             win_private_assemblies=False,
+             cipher=None)
+
+pyz = PYZ(a.pure, a.zipped_data,
+             cipher=None)
+
+exe = EXE(pyz,
+          a.scripts,
+          exclude_binaries=True,
+          name='sasview',
+          debug=False,
+          upx=UPX,
+          icon=os.path.join("../src/sas/sasview/images","ball.ico"),
+          version="version.txt",
+          console=False )
+
+# COLLECT creates a directory instead of a single file.
+coll = COLLECT(exe,
+               a.binaries,
+               a.zipfiles,
+               a.datas,
+               strip=False,
+               upx=UPX,
+               name='sasview')
+
+if platform.system() == 'Darwin':
+    app = BUNDLE(exe,
+        name='SasView.app',
+        icon='../src/sas/sasview/images/ball.ico',
+        bundle_identifier=None)
+
