1515# limitations under the License.
1616#
1717
18- import os
1918import sys
2019
2120from setuptools import setup , find_packages
22- from pip .req import parse_requirements
23- from pip .download import PipSession
2421
2522
2623def test_python_version ():
27- if float ("%d.%d" % sys .version_info [:2 ]) < 2.6 :
28- print ('Your Python version {0}.{1}.{2} is not supported.' .format (
29- * sys .version_info [:3 ]))
30- print ('stackdio requires Python 2.6 or newer.' )
24+ major = sys .version_info [0 ]
25+ minor = sys .version_info [1 ]
26+ micro = sys .version_info [2 ]
27+ if float ('%d.%d' % (major , minor )) < 2.6 :
28+ err_msg = ('Your Python version {0}.{1}.{2} is not supported.\n '
29+ 'stackdio-server requires Python 2.6 or newer.\n ' .format (major , minor , micro ))
30+ sys .stderr .write (err_msg )
3131 sys .exit (1 )
3232
33-
34- def load_pip_requirements (fp ):
35- reqs , deps = [], []
36- for r in parse_requirements (fp , session = PipSession ()):
37- if r .url is not None :
38- deps .append (str (r .url ))
39- reqs .append (str (r .req ))
40- return reqs , deps
41-
4233# Set version
4334__version__ = '0.0.0' # Explicit default
44- execfile (" stackdio/client/version.py" )
35+ execfile (' stackdio/client/version.py' )
4536
4637
4738SHORT_DESCRIPTION = ('A cloud deployment, automation, and orchestration '
4839 'platform for everyone.' )
49- LONG_DESCRIPTION = SHORT_DESCRIPTION
5040
51- # If we have a README.md file, use its contents as the long description
52- if os .path .isfile ('README.md' ):
53- with open ('README.md' ) as f :
54- LONG_DESCRIPTION = f .read ()
41+ # Use the README.md as the long description
42+ with open ('README.md' ) as f :
43+ LONG_DESCRIPTION = f .read ()
5544
45+ requirements = [
46+ 'simplejson' ,
47+ 'requests>=2.4.0,<2.6.0' ,
48+ ]
5649
5750if __name__ == "__main__" :
58- # build our list of requirements and dependency links based on our
59- # requirements.txt file
60- reqs , deps = load_pip_requirements ('requirements.txt' )
51+ test_python_version ()
6152
6253 # Call the setup method from setuptools that does all the heavy lifting
63- # of packaging stackdio
54+ # of packaging stackdio-client
6455 setup (
6556 name = 'stackdio' ,
6657 version = __version__ ,
@@ -73,17 +64,18 @@ def load_pip_requirements(fp):
7364 include_package_data = True ,
7465 packages = find_packages (),
7566 zip_safe = False ,
76- install_requires = reqs ,
77- dependency_links = deps ,
67+ install_requires = requirements ,
68+ dependency_links = [] ,
7869 classifiers = [
79- 'Development Status :: 3 - Alpha ' ,
70+ 'Development Status :: 4 - Beta ' ,
8071 'Environment :: Web Environment' ,
8172 'Framework :: Django' ,
8273 'Intended Audience :: Developers' ,
8374 'Intended Audience :: Information Technology' ,
8475 'Intended Audience :: System Administrators' ,
8576 'License :: OSI Approved :: Apache Software License' ,
8677 'Programming Language :: Python' ,
78+ 'Programming Language :: Python :: 2' ,
8779 'Programming Language :: Python :: 2.6' ,
8880 'Programming Language :: Python :: 2.7' ,
8981 'Topic :: System :: Clustering' ,
0 commit comments