Browse Source

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
changes/91/176091/4
Louis Taylor 7 years ago
parent
commit
34f325a166
  1. 3
      requirements-py3.txt
  2. 4
      requirements.txt
  3. 27
      setup.py

3
requirements-py3.txt

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

4
requirements.txt

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

27
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
)
Loading…
Cancel
Save