Skip to content

Commit

Permalink
[#342] Conda environment files for Mac OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
quicklizard99 committed Aug 16, 2016
1 parent f139f95 commit ca7d4fc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 40 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ This is an overview of major changes. Refer to the git repository for a full log

Version 0.1.34
-------------
- #342 Conda environment files
- #333 Ugly error message when opening or saving a file
- #330 libdmtx URL incorrect
- #328 Menu commands to show cookie cutter and metadata template files
Expand Down
31 changes: 7 additions & 24 deletions DevelopingOnMacOSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,16 @@ conda update --yes conda
# Inselect env

```
conda create --yes --name inselect pillow=3.2.0 qt=4.8.7 pyside=1.1.2 numpy=1.10.1 scipy==0.17.1 scikit-learn=0.17.1
conda env create -f inselect.yml
source activate inselect
```
# Dependencies
# Conda packages specific to OS X
conda install --name inselect --file inselect-osx-64.txt
```
cd ~/projects/inselect
# PyPi packages that can't be specified in a conda environment yml file
pip install -r requirements.txt
```

## OpenCV
`jjhelmus` provides versions after `2.4.10` but these make the Mac build
extremely problematic by introducing many `dylib` dependencies that are
troublesome to freeze.
```
conda install --yes -c https://conda.binstar.org/jjhelmus opencv=2.4.10
conda install --yes numpy=1.10.1
```

## setuptools
A [bug in PyInstaller 3.1.1](https://github.com/pyinstaller/pyinstaller/issues/1773)
means that we need to use setupools 19.2:

```
conda install --yes setuptools=19.2
```

## LibDMTX barcode reading library

* Get source for the library and the wrappers
Expand Down Expand Up @@ -115,10 +97,11 @@ python -m bin.freeze_icons

# Build

The build script freezes icons.
The build script freezes icons, runs tests, freezes python and assembles files
into a `.dmg` file.

```
./build.sh
```

Installer will be in `dist`.
The `.dmg` file will be in `dist`.
15 changes: 15 additions & 0 deletions inselect.spec
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ MISSING_DYLIBS = (
'libQtGui.4.dylib',
'libpng16.16.dylib',
'libz.1.dylib',
'libopencv_contrib.2.4.dylib',
'libopencv_nonfree.2.4.dylib',
'libopencv_gpu.2.4.dylib',
'libopencv_legacy.2.4.dylib',
'libopencv_photo.2.4.dylib',
'libopencv_ocl.2.4.dylib',
'libopencv_calib3d.2.4.dylib',
'libopencv_features2d.2.4.dylib',
'libopencv_flann.2.4.dylib',
'libopencv_ml.2.4.dylib',
'libopencv_video.2.4.dylib',
'libopencv_objdetect.2.4.dylib',
'libopencv_highgui.2.4.dylib',
'libopencv_imgproc.2.4.dylib',
'libopencv_core.2.4.dylib',
)

# The lib directory associated with this environment
Expand Down
16 changes: 0 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
# Installed via conda / manually: PySide, Pillow, numpy, opencv, pywin32
exifread==2.1.2
humanize==0.5.1
pathlib==1.0.1
psutil==4.0.0
python-dateutil==2.3 # 2.5.0 causes problems for PyInstaller builds on Mac OS X
pytz==2015.7
PyYAML==3.11
schematics==1.1.1
unicodecsv==0.14.1

# Not from PyPI
https://github.com/NaturalHistoryMuseum/gouda/archive/v0.1.5.tar.gz
https://github.com/NaturalHistoryMuseum/zbar-python-patched/archive/v0.10.tar.gz ; sys_platform != 'win32'

# Development
coveralls>=0.4.1
mock>=1.0.1
nose>=1.3.4
pyinstaller==3.1.1 ; sys_platform == 'darwin'

# cx_Freeze 4.3.2 introduced a bug that prevents python win32com wrappers
Expand Down

0 comments on commit ca7d4fc

Please sign in to comment.