Browse Source
root/setup.py
Revision e43c71a5fd9a2d6fbba08b913b44ee2e6d3b28d8, 2.5 KB (checked in by Thijs Triemstra <thijs@…>, 11 months ago)

update dependency for pyamf

  • Property mode set to 100644
Line 
1# Copyright (c) 2007-2009 The RTMPy Project.
2# See LICENSE for details.
3
4from ez_setup import use_setuptools
5
6use_setuptools()
7
8import sys
9from setuptools import setup, find_packages
10
11def get_version():
12    """
13    Gets the version number. Pulls it from the source files rather than
14    duplicating it.
15    """
16    import os.path
17    # we read the file instead of importing it as root sometimes does not
18    # have the cwd as part of the PYTHONPATH
19
20    fn = os.path.join(os.path.dirname(__file__), 'rtmpy', '__init__.py')
21    lines = open(fn, 'rt').readlines()
22
23    version = None
24
25    for l in lines:
26        # include the ' =' as __version__ is a part of __all__
27        if l.startswith('__version__ =', ):
28            x = compile(l, fn, 'single')
29            eval(x)
30            version = locals()['__version__']
31            break
32
33    if version is None:
34        raise RuntimeError('Couldn\'t determine version number')
35
36    return '.'.join([str(x) for x in version])
37
38def get_install_requirements():
39    """
40    Returns a list of dependencies for RTMPy to function correctly on the
41    target platform.
42    """
43    install_requires = ['Twisted>=2.5.0', 'PyAMF>=0.5']
44
45    if sys.platform.startswith('win'):
46        install_requires.append('PyWin32')
47
48    return install_requires
49
50keyw = """\
51rtmp flv rtmps rtmpe rtmpt rtmpte amf amf0 amf3 flex flash http https
52streaming video audio sharedobject webcam record playback pyamf client
53flashplayer air actionscript decoder encoder gateway server"""
54
55setup(name = "RTMPy",
56    version = get_version(),
57    description = "Twisted protocol for RTMP",
58    long_description = open('README.txt', 'rt').read(),
59    url = "http://rtmpy.org",
60    author = "The RTMPy Project",
61    author_email = "rtmpy-dev@rtmpy.org",
62    keywords = keyw,
63    packages = find_packages(exclude=["*.tests"]),
64    install_requires = get_install_requirements(),
65    zip_safe = True,
66    license = "MIT License",
67    platforms = ["any"],
68    classifiers = [
69        "Development Status :: 2 - Pre-Alpha",
70        "Framework :: Twisted",
71        "Natural Language :: English",
72        "Intended Audience :: Developers",
73        "Intended Audience :: Information Technology",
74        "License :: OSI Approved :: MIT License",
75        "Operating System :: OS Independent",
76        "Programming Language :: Python",
77        "Programming Language :: Python :: 2.3",
78        "Programming Language :: Python :: 2.4",
79        "Programming Language :: Python :: 2.5",
80        "Programming Language :: Python :: 2.6",
81        "Topic :: Software Development :: Libraries :: Python Modules",
82    ])