1# encoding: utf-8
2from distutils.core import setup
3import os
4import re
5import sys
6
7if any(a == 'bdist_wheel' for a in sys.argv):
8    from setuptools import setup
9
10with open(os.path.join(os.path.dirname(__file__), 'pexpect', '__init__.py'), 'r') as f:
11    for line in f:
12        version_match = re.search(r"__version__ = ['\"]([^'\"]*)['\"]", line)
13        if version_match:
14            version = version_match.group(1)
15            break
16    else:
17        raise Exception("couldn't find version number")
18
19long_description = """
20Pexpect is a pure Python module for spawning child applications; controlling
21them; and responding to expected patterns in their output. Pexpect works like
22Don Libes' Expect. Pexpect allows your script to spawn a child application and
23control it as if a human were typing commands.
24
25Pexpect can be used for automating interactive applications such as ssh, ftp,
26passwd, telnet, etc. It can be used to a automate setup scripts for duplicating
27software package installations on different servers. It can be used for
28automated software testing. Pexpect is in the spirit of Don Libes' Expect, but
29Pexpect is pure Python.
30
31The main features of Pexpect require the pty module in the Python standard
32library, which is only available on Unix-like systems. Some features—waiting
33for patterns from file descriptors or subprocesses—are also available on
34Windows.
35"""
36
37setup(name='pexpect',
38    version=version,
39    packages=['pexpect'],
40    package_data={'pexpect': ['bashrc.sh']},
41    description='Pexpect allows easy control of interactive console applications.',
42    long_description=long_description,
43    author='Noah Spurrier; Thomas Kluyver; Jeff Quast',
44    author_email='noah@noah.org, thomas@kluyver.me.uk, contact@jeffquast.com',
45    url='https://pexpect.readthedocs.io/',
46    license='ISC license',
47    platforms='UNIX',
48    classifiers = [
49        'Development Status :: 5 - Production/Stable',
50        'Environment :: Console',
51        'Intended Audience :: Developers',
52        'Intended Audience :: System Administrators',
53        'License :: OSI Approved :: ISC License (ISCL)',
54        'Operating System :: POSIX',
55        'Operating System :: MacOS :: MacOS X',
56        'Programming Language :: Python',
57        'Programming Language :: Python :: 2.7',
58        'Programming Language :: Python :: 3',
59        'Topic :: Software Development',
60        'Topic :: Software Development :: Libraries :: Python Modules',
61        'Topic :: Software Development :: Quality Assurance',
62        'Topic :: Software Development :: Testing',
63        'Topic :: System',
64        'Topic :: System :: Archiving :: Packaging',
65        'Topic :: System :: Installation/Setup',
66        'Topic :: System :: Shells',
67        'Topic :: System :: Software Distribution',
68        'Topic :: Terminals',
69    ],
70    install_requires=['ptyprocess>=0.5'],
71)
72