From ba1fb5cf062ffe0f6402217ea8b7a147a76074af Mon Sep 17 00:00:00 2001 From: Iwase Yusuke Date: Tue, 23 Aug 2016 14:08:27 +0900 Subject: [PATCH] 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 Signed-off-by: FUJITA Tomonori --- tools/ryu-manager.spec | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tools/ryu-manager.spec 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)