-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6766cf0
commit 95a9c48
Showing
4 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ cover | |
MANIFEST | ||
*spec | ||
!inselect.spec | ||
!segment.spec | ||
*tar.gz | ||
*dmg | ||
.directory | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# -*- mode: python -*- | ||
import sys | ||
|
||
from pathlib import Path | ||
|
||
block_cipher = None | ||
|
||
|
||
a = Analysis(['inselect/scripts/segment.py'], | ||
pathex=['/Users/lawrence/projects/inselect'], | ||
binaries=None, | ||
datas=None, | ||
hiddenimports=['numpy', 'sklearn.neighbors.typedefs'], | ||
hookspath=[], | ||
runtime_hooks=[], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher) | ||
|
||
# PyInstaller does not detect some dylibs, I think in some cases because they | ||
# are symlinked. | ||
# See Stack Overflow post http://stackoverflow.com/a/17595149 for example | ||
# of manipulating Analysis.binaries. | ||
MISSING_DYLIBS = ( | ||
'libiomp5.dylib', | ||
'libmkl_intel_lp64.dylib', | ||
'libmkl_intel_thread.dylib', | ||
'libmkl_core.dylib', | ||
) | ||
|
||
# The lib directory associated with this environment | ||
LIB = Path(sys.argv[0]).parent.parent.joinpath('lib') | ||
|
||
# Find the source for each library and add it to the list of binaries | ||
a.binaries += TOC([ | ||
(lib, str(LIB.joinpath(lib).resolve()), 'BINARY') for lib in MISSING_DYLIBS | ||
]) | ||
|
||
pyz = PYZ(a.pure, a.zipped_data, | ||
cipher=block_cipher) | ||
exe = EXE(pyz, | ||
a.scripts, | ||
a.binaries, | ||
a.zipfiles, | ||
a.datas, | ||
name='segment', | ||
debug=False, | ||
strip=False, | ||
upx=True, | ||
console=True ) |