From dcff5ff51661254532308bde65bfa889d284eebf Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 4 Dec 2012 12:38:26 +0100 Subject: [PATCH] Use install_requires in setup.py Using install_requires makes sure that if some code is using Swift internal and wants to require Swift, all its dependencies have been already pulled. This is really useful on test automation for example, otherwise, code might be failing because on of the module listed in pip-requires is not instaled. Also, we change the pip-requires files to use >= rather than ==, so the requirements are easily fulfiled with distribution provided packages. Change-Id: I65814bcd8ce798da21a5c17b4d5916a23f59e962 Signed-off-by: Julien Danjou --- setup.py | 6 +++++- tools/pip-requires | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 8c3dfee83f..847d6f4cc3 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,10 @@ from swift import __canonical_version__ as version name = 'swift' +with open('tools/pip-requires', 'r') as f: + requires = [x.strip() for x in f if x.strip()] + + setup( name=name, version=version, @@ -40,7 +44,7 @@ setup( 'Environment :: No Input/Output (Daemon)', 'Environment :: OpenStack', ], - install_requires=[], # removed for better compat + install_requires=requires, scripts=[ 'bin/swift-account-audit', 'bin/swift-account-auditor', diff --git a/tools/pip-requires b/tools/pip-requires index 3647e235ea..b47f62d08c 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -1,7 +1,7 @@ -eventlet==0.9.15 -greenlet==0.3.1 -netifaces==0.6 -pastedeploy==1.3.3 -simplejson==2.0.9 -xattr==0.4 +eventlet>=0.9.15 +greenlet>=0.3.1 +netifaces>=0.6 +pastedeploy>=1.3.3 +simplejson>=2.0.9 +xattr>=0.4 python-swiftclient