diff --git a/.travis.yml b/.travis.yml index 4e991b4..3fbabe6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,13 @@ sudo: false language: python + notifications: email: false + python: - - 2.7 - - 2.6 - pypy + - 2.6 + - 2.7 - pypy3 - 3.3 - 3.4 @@ -13,7 +15,9 @@ python: before_install: - pip install https://github.com/pyexcel/pyexcel/archive/v0.2.1.zip - pip install -r tests/requirements.txt + script: make test + after_success: codecov \ No newline at end of file diff --git a/setup.py b/setup.py index b2884e9..747d9c5 100644 --- a/setup.py +++ b/setup.py @@ -5,38 +5,17 @@ use_setuptools() from setuptools import setup, find_packages -with open("README.rst", 'r') as readme: - README_txt = readme.read() - -with open("CHANGELOG.rst", 'r') as changelog: - README_txt += changelog.read() - -dependencies = [ - 'pyexcel>=0.2.0', - 'tabulate>=0.7.4', -] - -extras = {} - - -setup( - name='pyexcel-text', - author='C.W.', - version='0.2.0', - author_email='wangc_2011 (at) hotmail.com', - url='https://github.com/pyexcel/pyexcel-text', - description='A plugin to pyexcel and provides the capbility to present and write data in text fromats', - install_requires=dependencies, - extras_require=extras, - packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), - include_package_data=True, - long_description=README_txt, - zip_safe=False, - tests_require=['nose'], - keywords=[ - 'excel', - 'python', - 'pyexcel', +NAME = 'pyexcel-text' +AUTHOR = 'C.W.' +VERSION = '0.2.0' +EMAIL = 'wangc_2011 (at) hotmail.com' +LICENSE = 'New BSD' +PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests']) +DESCRIPTION = 'A plugin to pyexcel and provides the capbility to present and write data in text fromats' +KEYWORDS = [ + 'excel', + 'python', + 'pyexcel', "plain", "simple", "grid", @@ -47,19 +26,59 @@ "latex", "latex_booktabs", "json" - ], - license='New BSD', - classifiers=[ - 'Topic :: Office/Business', - 'Topic :: Utilities', - 'Topic :: Software Development :: Libraries', - 'Programming Language :: Python', - 'License :: OSI Approved :: BSD License', - 'Intended Audience :: Developers', +] + +INSTALL_REQUIRES = [ + 'pyexcel>=0.2.0', + 'tabulate>=0.7.4', +] + +EXTRAS_REQUIRE = {} + +CLASSIFIERS = [ + 'Topic :: Office/Business', + 'Topic :: Utilities', + 'Topic :: Software Development :: Libraries', + 'Programming Language :: Python', + 'License :: OSI Approved :: BSD License', + 'Intended Audience :: Developers', 'Development Status :: 3 - Alpha', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: PyPy' - ] -) \ No newline at end of file +] + + +def read_files(*files): + """Read files into setup""" + text = "" + for single_file in files: + text = text + read(single_file) + "\n" + return text + + +def read(afile): + """Read a file into setup""" + with open(afile, 'r') as opened_file: + return opened_file.read() + + +if __name__ == '__main__': + setup( + name=NAME, + author=AUTHOR, + version=VERSION, + author_email=EMAIL, + description=DESCRIPTION, + install_requires=INSTALL_REQUIRES, + keywords=KEYWORDS, + extras_require=EXTRAS_REQUIRE, + packages=PACKAGES, + include_package_data=True, + long_description=read_files('README.rst', 'CHANGELOG.rst'), + zip_safe=False, + tests_require=['nose'], + license=LICENSE, + classifiers=CLASSIFIERS + ) \ No newline at end of file