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
This commit is contained in:
alexpilotti 2013-08-15 19:49:31 +03:00
parent 511113d42e
commit e1165ce118
2 changed files with 4 additions and 4 deletions

View File

@ -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')
elif sys.platform.startswith('linux'):
requires.append('pyudev')
metadata['requires_dist'] = "\n".join(requires)
config['metadata'] = metadata

View File

@ -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