summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIwase Yusuke <iwase.yusuke0@gmail.com>2016-08-23 14:08:27 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-08-25 14:25:57 +0900
commitba1fb5cf062ffe0f6402217ea8b7a147a76074af (patch)
tree75d041ff8a33b77971f25a727f60eaf278083277
parentdb0f6c1165ca8941d75a4d2e5f8014933485da7d (diff)
PyInstaller: Enable to build stand-alone executables
Usage: After installing Ryu (on virtualenv is better), build a ryu-manager executable as following: $ pip install PyInstaller==3.1.1 $ cd tools/ $ pyinstaller ryu-manager.spec $ ./dist/ryu-manager Note: PyInstaller==3.2 may have a bug of str encoding, please use Pyinstaller==3.1.1 instead. https://github.com/pyinstaller/pyinstaller/issues/1976 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--tools/ryu-manager.spec28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/ryu-manager.spec b/tools/ryu-manager.spec
new file mode 100644
index 00000000..83df85a3
--- /dev/null
+++ b/tools/ryu-manager.spec
@@ -0,0 +1,28 @@
+# -*- mode: python -*-
+
+block_cipher = None
+
+
+a = Analysis(['../bin/ryu-manager'],
+ pathex=['../ryu'],
+ binaries=None,
+ datas=None,
+ hiddenimports=['ryu.controller.ofp_handler'],
+ hookspath=[],
+ runtime_hooks=[],
+ excludes=[],
+ win_no_prefer_redirects=False,
+ win_private_assemblies=False,
+ cipher=block_cipher)
+pyz = PYZ(a.pure, a.zipped_data,
+ cipher=block_cipher)
+exe = EXE(pyz,
+ a.scripts,
+ a.binaries,
+ a.zipfiles,
+ a.datas,
+ name='ryu-manager',
+ debug=False,
+ strip=False,
+ upx=True,
+ console=True)