Imported Upstream version 0.5.1
Julien Puydt
8 years ago
0 | language: python | |
1 | python: | |
2 | - "2.7" | |
3 | - "3.3" | |
4 | - "3.4" | |
5 | # command to run tests | |
6 | script: py.test --verbose --verbose | |
7 | sudo: False |
0 | Metadata-Version: 1.1 | |
1 | Name: ptyprocess | |
2 | Version: 0.5.1 | |
3 | Summary: Run a subprocess in a pseudo terminal | |
4 | Home-page: https://github.com/pexpect/ptyprocess | |
5 | Author: Thomas Kluyver | |
6 | Author-email: thomas@kluyver.me.uk |
56 | 56 | # The short X.Y version. |
57 | 57 | version = '0.5' |
58 | 58 | # The full version, including alpha/beta/rc tags. |
59 | release = version | |
59 | release = version + '.1' | |
60 | 60 | |
61 | 61 | # The language for content autogenerated by Sphinx. Refer to documentation |
62 | 62 | # for a list of supported languages. |
0 | [metadata] | |
1 | module = ptyprocess | |
2 | author = Thomas Kluyver | |
3 | author-email = thomas@kluyver.me.uk | |
4 | home-page = https://github.com/pexpect/ptyprocess | |
5 | description-file = README.rst | |
6 | classifiers = Development Status :: 5 - Production/Stable | |
7 | Environment :: Console | |
8 | Intended Audience :: Developers | |
9 | Intended Audience :: System Administrators | |
10 | License :: OSI Approved :: ISC License (ISCL) | |
11 | Operating System :: POSIX | |
12 | Operating System :: MacOS :: MacOS X | |
13 | Programming Language :: Python | |
14 | Programming Language :: Python :: 2.7 | |
15 | Programming Language :: Python :: 3 | |
16 | Topic :: Terminals |
0 | """Run a subprocess in a pseudo terminal""" | |
0 | 1 | from .ptyprocess import PtyProcess, PtyProcessUnicode, PtyProcessError |
1 | 2 | |
2 | __version__ = '0.5' | |
3 | __version__ = '0.5.1' |
54 | 54 | """ |
55 | 55 | global _EOF, _INTR |
56 | 56 | if (_EOF is not None) and (_INTR is not None): |
57 | pass | |
57 | return | |
58 | 58 | |
59 | 59 | # inherit EOF and INTR definitions from controlling process. |
60 | 60 | try: |
364 | 364 | # trigger an exception because os.close may be None. |
365 | 365 | try: |
366 | 366 | self.close() |
367 | # which exception, shouldnt' we catch explicitly .. ? | |
367 | # which exception, shouldn't we catch explicitly .. ? | |
368 | 368 | except: |
369 | 369 | pass |
370 | 370 |
0 | 0 | #!/usr/bin/env python |
1 | 1 | |
2 | import sys | |
3 | 2 | from distutils.core import setup |
4 | 3 | |
5 | with open('README.rst') as f: | |
6 | readme = f.read() | |
7 | ||
8 | assert sys.version_info >= (2, 7), ( | |
9 | "Only python 2.7 and later is supported by ptyprocess.") | |
10 | ||
11 | 4 | setup(name='ptyprocess', |
12 | version='0.5', | |
13 | description="Run a subprocess in a pseudo terminal", | |
14 | long_description=readme, | |
5 | version='0.5.1', | |
6 | description='Run a subprocess in a pseudo terminal', | |
15 | 7 | author='Thomas Kluyver', |
16 | author_email="thomas@kluyver.me.uk", | |
17 | url="https://github.com/pexpect/ptyprocess", | |
18 | packages=['ptyprocess'], | |
19 | classifiers = [ | |
20 | 'Development Status :: 5 - Production/Stable', | |
21 | 'Environment :: Console', | |
22 | 'Intended Audience :: Developers', | |
23 | 'Intended Audience :: System Administrators', | |
24 | 'License :: OSI Approved :: ISC License (ISCL)', | |
25 | 'Operating System :: POSIX', | |
26 | 'Operating System :: MacOS :: MacOS X', | |
27 | 'Programming Language :: Python', | |
28 | 'Programming Language :: Python :: 2.7', | |
29 | 'Programming Language :: Python :: 3', | |
30 | 'Topic :: Terminals', | |
31 | ], | |
32 | ) | |
8 | author_email='thomas@kluyver.me.uk', | |
9 | url='https://github.com/pexpect/ptyprocess', | |
10 | packages=['ptyprocess'] | |
11 | ) |
33 | 33 | # result of echo $ENV_KEY in output |
34 | 34 | assert env_value in outp |
35 | 35 | |
36 | # exit succesfully (exit 0) | |
36 | # exit successfully (exit 0) | |
37 | 37 | assert p.wait() == 0 |
38 | 38 | |
39 | 39 | |
49 | 49 | |
50 | 50 | def test_quick_spawn(self): |
51 | 51 | """Spawn a very short-lived process.""" |
52 | # so far only reproducable on Solaris 11, spawning a process | |
52 | # so far only reproducible on Solaris 11, spawning a process | |
53 | 53 | # that exits very quickly raised an exception at 'inst.setwinsize', |
54 | 54 | # because the pty file descriptor was quickly lost after exec(). |
55 | 55 | PtyProcess.spawn(['true']) |