From e1165ce1180bba1a11098cfacfe3c722a084dbcf Mon Sep 17 00:00:00 2001 From: alexpilotti Date: Thu, 15 Aug 2013 19:49:31 +0300 Subject: [PATCH] Fixes Windows setup dependency bug Fixes bug: #1212385 The neutron project includes a setup hook that allows to dinamically include setup dependencies. Due to recent changes in the pbr project, the hook raises an exception on Windows, which ends the setup process. This fix solves the issue by adapting the hook to the recent pbr changes. Change-Id: I4b00d74d23a7167a10ba86458943ff16ca51b0db --- neutron/hooks.py | 7 ++++--- requirements.txt | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/neutron/hooks.py b/neutron/hooks.py index 2c6a587a6d5..6b4a1e78c6b 100644 --- a/neutron/hooks.py +++ b/neutron/hooks.py @@ -21,10 +21,11 @@ import sys def setup_hook(config): """Filter config parsed from a setup.cfg to inject our defaults.""" metadata = config['metadata'] + requires = metadata.get('requires_dist', '').split('\n') if sys.platform == 'win32': - requires = metadata.get('requires_dist', list()).split('\n') requires.append('pywin32') requires.append('wmi') - requires.remove('pyudev') - metadata['requires_dist'] = "\n".join(requires) + elif sys.platform.startswith('linux'): + requires.append('pyudev') + metadata['requires_dist'] = "\n".join(requires) config['metadata'] = metadata diff --git a/requirements.txt b/requirements.txt index 21af5e499a9..828d4d5b8de 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,6 @@ iso8601>=0.1.4 kombu>=2.4.8 netaddr python-neutronclient>=2.2.3,<3 -pyudev SQLAlchemy>=0.7.8,<=0.7.99 WebOb>=1.2.3,<1.3 python-keystoneclient>=0.3.0