Clean up setup.py and add requirements.txt

Previously setup.py had information about which versions of libraries to depend
on based on the python version. Since we don't need to support those versions
anymore (2.5, 2.6 and 3.3), these dependancies can be listed in a
requirements.txt file.  This can be set up to sync with global-requirements at
a later date.

ipaddr is added to requirements-py2.txt, since it is only needed on python
version lower than 3.3.

Change-Id: I90c4cbd7961ffdf6769578986c272bf9f5721d77
This commit is contained in:
Louis Taylor 2015-04-21 22:32:28 +01:00
parent 44d514886b
commit 34f325a166
3 changed files with 10 additions and 24 deletions

3
requirements-py3.txt Normal file
View File

@ -0,0 +1,3 @@
six>=1.9.0
WebOb>=1.2.3
simplegeneric

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
six>=1.9.0
WebOb>=1.2.3
simplegeneric
ipaddr

View File

@ -1,27 +1,6 @@
from setuptools import setup
import sys
import setuptools
if sys.version_info[:2] <= (2, 5):
webob_version = ' <= 1.1.1'
elif sys.version_info[:2] >= (3, 0):
webob_version = ' >= 1.2.2'
else:
webob_version = ''
install_requires = [
'six',
'simplegeneric',
'WebOb' + webob_version
]
if sys.version_info[:2] <= (2, 6):
install_requires += ('ordereddict',)
if sys.version_info[:2] < (3, 3):
install_requires += ('ipaddr',)
setup(
setup_requires=['pbr>=0.5.21'],
install_requires=install_requires,
setuptools.setup(
setup_requires=['pbr'],
pbr=True
)