55 use_setuptools ()
66 from setuptools import setup , find_packages
77
8- with open ("README.rst" , 'r' ) as readme :
9- README_txt = readme .read ()
8+ NAME = 'pyexcel-webio'
9+ AUTHOR = 'C.W.'
10+ VERSION = '0.0.6'
11+ EMAIL = 'wangc_2011 (at) hotmail.com'
12+ LICENSE = 'New BSD'
13+ PACKAGES = find_packages (exclude = ['ez_setup' , 'examples' , 'tests' ])
14+ DESCRIPTION = 'A generic request and response interface for pyexcel web extensions.'
15+ KEYWORDS = [
16+ 'excel' ,
17+ 'python' ,
18+ 'pyexcel' ,
19+ 'http'
20+ ]
1021
11- dependencies = [
22+ INSTALL_REQUIRES = [
1223 'pyexcel>=0.2.0' ,
1324]
1425
15- extras = {}
16-
17-
18- setup (
19- name = 'pyexcel-webio' ,
20- author = 'C. W.' ,
21- version = '0.0.6' ,
22- author_email = 'wangc_2011 (at) hotmail.com' ,
23- url = 'https://github.com/pyexcel/pyexcel-webio' ,
24- description = 'A generic request and response interface for pyexcel web extensions.' ,
25- install_requires = dependencies ,
26- extras_require = extras ,
27- packages = find_packages (exclude = ['ez_setup' , 'examples' , 'tests' ]),
28- include_package_data = True ,
29- long_description = README_txt ,
30- zip_safe = False ,
31- tests_require = ['nose' ],
32- keywords = [
33- 'excel' ,
34- 'python' ,
35- 'pyexcel' ,
36- 'http'
37- ],
38- license = 'New BSD' ,
39- classifiers = [
40- 'Topic :: Office/Business' ,
41- 'Topic :: Utilities' ,
42- 'Topic :: Software Development :: Libraries' ,
43- 'Programming Language :: Python' ,
44- 'License :: OSI Approved :: BSD License' ,
45- 'Intended Audience :: Developers' ,
26+ EXTRAS_REQUIRE = {
27+ }
28+
29+ CLASSIFIERS = [
30+ 'Topic :: Office/Business' ,
31+ 'Topic :: Utilities' ,
32+ 'Topic :: Software Development :: Libraries' ,
33+ 'Programming Language :: Python' ,
34+ 'License :: OSI Approved :: BSD License' ,
35+ 'Intended Audience :: Developers' ,
4636 'Environment :: Web Environment' ,
4737 'Topic :: Internet :: WWW/HTTP' ,
4838 'Topic :: Software Development :: Libraries :: Python Modules' ,
5545 'Programming Language :: Python :: 3.4' ,
5646 'Programming Language :: Python :: 3.5' ,
5747 'Programming Language :: Python :: Implementation :: PyPy'
58- ]
59- )
48+ ]
49+
50+
51+ def read_files (* files ):
52+ """Read files into setup"""
53+ text = ""
54+ for single_file in files :
55+ text = text + read (single_file ) + "\n "
56+ return text
57+
58+
59+ def read (afile ):
60+ """Read a file into setup"""
61+ with open (afile , 'r' ) as opened_file :
62+ return opened_file .read ()
63+
64+
65+ if __name__ == '__main__' :
66+ setup (
67+ name = NAME ,
68+ author = AUTHOR ,
69+ version = VERSION ,
70+ author_email = EMAIL ,
71+ description = DESCRIPTION ,
72+ install_requires = INSTALL_REQUIRES ,
73+ keywords = KEYWORDS ,
74+ extras_require = EXTRAS_REQUIRE ,
75+ packages = PACKAGES ,
76+ include_package_data = True ,
77+ long_description = read_files ('README.rst' , 'CHANGELOG.rst' ),
78+ zip_safe = False ,
79+ tests_require = ['nose' ],
80+ license = LICENSE ,
81+ classifiers = CLASSIFIERS
82+ )
0 commit comments