try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

import codecs
import os
import re
import sys


here = os.path.abspath(os.path.dirname(__file__))

py3 = sys.version_info[0] == 3


# Read the version number from a source file.
# Why read it, and not import?
# see https://groups.google.com/d/topic/pypa-dev/0PkjVpcxTzQ/discussion
def find_version(*file_paths):
    # Open in Latin-1 so that we avoid encoding errors.
    # Use codecs.open for Python 2 compatibility
    with codecs.open(os.path.join(here, *file_paths), 'r', 'latin1') as f:
        version_file = f.read()

    # The version line must have the form
    # __version__ = 'ver'
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                              version_file, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError('Unable to find version string')


def read_description(filename):
    with codecs.open(filename, encoding='utf-8') as f:
        return f.read()


install_requires = [
    'click>=3.3,<3.4',
    'lxml>=3.4.0,<3.5.0',
    'requests>=2.5.0,<2.6.0',
]

test_requires = [
    'pytest',
    'pytest-cov',
]

dev_requires = [
    'ipython',
] + test_requires

setup(
    name='twbanker',
    version=find_version('twbanker', '__init__.py'),
    url='https://github.com/eliangcs/twbanker',
    description='Show you the money in your Taiwan banks',
    long_description=read_description('README.rst'),
    author='Chang-Hung Liang',
    author_email='eliang.cs@gmail.com',
    license='MIT',
    packages=['twbanker', 'twbanker.banks'],
    install_requires=install_requires,
    extras_require={
        'dev': dev_requires,
        'test': test_requires
    },
    entry_points="""
        [console_scripts]
        twbanker=twbanker.cli:main
    """,
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Office/Business :: Financial :: Accounting'
    ]
)

@@ -1138,61 +1138,8 @@
 %0A%5D%0A%0A
-test_requires = %5B%0A    'pytest',%0A    'pytest-cov',%0A%5D%0A%0A
 dev_
@@ -1171,24 +1171,8 @@
 ',%0A%5D
- + test_requires
 %0A%0Ase
@@ -1636,39 +1636,8 @@
 ires
-,%0A        'test': test_requires
 %0A   

Remove test requirements