From 34f325a1666ce4b6f84f0a9887b7874f9725e9b7 Mon Sep 17 00:00:00 2001 From: Louis Taylor Date: Tue, 21 Apr 2015 22:32:28 +0100 Subject: [PATCH] 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 --- requirements-py3.txt | 3 +++ requirements.txt | 4 ++++ setup.py | 27 +++------------------------ 3 files changed, 10 insertions(+), 24 deletions(-) create mode 100644 requirements-py3.txt create mode 100644 requirements.txt diff --git a/requirements-py3.txt b/requirements-py3.txt new file mode 100644 index 0000000..295c61e --- /dev/null +++ b/requirements-py3.txt @@ -0,0 +1,3 @@ +six>=1.9.0 +WebOb>=1.2.3 +simplegeneric diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b4112a0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +six>=1.9.0 +WebOb>=1.2.3 +simplegeneric +ipaddr diff --git a/setup.py b/setup.py index 1fbb3bf..a92d122 100644 --- a/setup.py +++ b/setup.py @@ -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 )