From: alexpilotti Date: Thu, 15 Aug 2013 16:49:31 +0000 (+0300) Subject: Fixes Windows setup dependency bug X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e1165ce1180bba1a11098cfacfe3c722a084dbcf;p=openstack-build%2Fneutron-build.git 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 --- diff --git a/neutron/hooks.py b/neutron/hooks.py index 2c6a587a6..6b4a1e78c 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 21af5e499..828d4d5b8 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