-
Notifications
You must be signed in to change notification settings - Fork 28
/
setup.py
163 lines (119 loc) · 4.07 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
from setuptools import setup, find_packages
import sys, os
version = '1.0.4'
long_description='''
------------
Introduction
------------
Castro is a library for recording automated screencasts via a simple API.
Here's an example::
>>> from castro import Castro
>>> c = Castro()
>>> c.start()
>>> # Do something awesome!
>>> c.stop()
-------
Install
-------
::
1) Install and launch a vncserver. (Hint: Google it.)
2) $ [sudo] easy_install castro
3) There's no step 3!
----
Test
----
::
$ python -c "import castro; castro.test()"
-----
Watch
-----
Video stored in: <default_temp_dir>/castro-video.swf
Video player stored in: <default_temp_dir>/castro-video.html
Linux/OSX::
$ firefox /tmp/castro-video.html
--------------------
License & Repository
--------------------
Castro was created by `Jason Huggins <http://jrandolph.com>`_. It is licensed under
the GPLv2, since it is a derivative work of pyvnc2swf, which is also
licensed under the GPLv2.
Castro has a `git respository at github.com <https://github.com/hugs/castro>`_.
-------
Summary
-------
Castro is a minor fork of pyvnc2swf, allowing one to use pyvnc2swf as a
regular Python library, instead of a Tk GUI application or command line
utility.
The specific improvement Castro brings to pyvnc2swf is the ability to start
and stop recording programmatically via a simple Python API. Castro
uses a file-based IPC to tell pyvnc2swf when to stop recording.
Ordinarily, pyvnc2swf's command line utility, vnc2swf.py, expects users to
stop recording by manually typing "Control-C", sending a KeyboardInterrupt
and allowing the process to exit cleanly. On Linux, emulating KeyboardInterrupt
is simple enough to do by sending a SIGINT signal. But this does not work cross-
platform, specifically on Windows. And a big reason for using pyvnc2swf is its
ability to record vnc video on any platform *from* any platform.
------------
Dependencies
------------
* Python - 2.5 or above
* Pygame - 1.6 or above
* Multiprocessing - 2.6.21 or above
* Simplejson - 2.0.9 or above
* PyYAML - 3.09 or above
Non-python dependences (for cleaning/editing .flv videos):
* flvtool2 (ruby gem)
* ffmpeg
------------
Changelog:
------------
* 1.0.4 - Added post-recording processing methods. (Depends on ffmpeg and flvtool2)
* 1.0.3 - Switched from processing library to multiprocessing.
Added support for changing recording framerate.
* 1.0.2 - Made stop() block until the recording process is done
Added support to use Castro in a with statement (e.g "with video(...):")
* 1.0.1 - Fixed default vnc password path
* 1.0 - First Release
'''
install_requires = [
# -*- Extra requirements: -*-
'PyYAML',
'pygame',
'setuptools',
]
# Python < 2.5 need some more
if float("%s.%s" % sys.version_info[:2]) < 2.6:
install_requires.extend([
'multiprocessing',
'simplejson',
])
setup(name='castro',
version=version,
description="Screencasting library",
long_description=long_description,
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Multimedia :: Graphics :: Capture :: Screen Capture',
'Topic :: Software Development :: Libraries :: Python Modules',
],
keywords='pyvnc2swf screencast video',
author='Jason R. Huggins',
author_email='[email protected]',
url='https://github.com/hugs/castro',
license='GPL',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
entry_points="""
# -*- Entry points: -*-
""",
)