From 1753c1e8d97e74a9c1f9ff7b6e375ce2981b44ce Mon Sep 17 00:00:00 2001 From: Wei-Li Tang Date: Sun, 5 Jan 2014 20:20:13 +0800 Subject: [PATCH] Fix Windows setup dependency bug The hook raises an AttributeError exception on Windows because of recent changes in the pbr project. This fix solves the issue. This is adapted from https://review.openstack.org/#/c/42170/ Since ryu didn't depend on pyudev, I think it no longer needs a removal here. Signed-off-by: Wei-Li Tang Signed-off-by: FUJITA Tomonori --- ryu/hooks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ryu/hooks.py b/ryu/hooks.py index 6d8cf9ae..dcb5cc90 100644 --- a/ryu/hooks.py +++ b/ryu/hooks.py @@ -40,10 +40,9 @@ def setup_hook(config): """Filter config parsed from a setup.cfg to inject our defaults.""" metadata = config['metadata'] if sys.platform == 'win32': - requires = metadata.get('requires_dist', list()).split('\n') + requires = metadata.get('requires_dist', '').split('\n') requires.append('pywin32') requires.append('wmi') - requires.remove('pyudev') metadata['requires_dist'] = "\n".join(requires) config['metadata'] = metadata