| 1 | #!/usr/bin/python |
|---|
| 2 | |
|---|
| 3 | from distutils.core import setup as _setup, Extension |
|---|
| 4 | import sys |
|---|
| 5 | import re |
|---|
| 6 | |
|---|
| 7 | import mediaproxy |
|---|
| 8 | |
|---|
| 9 | # Get the title and description from README |
|---|
| 10 | readme = open('README').read() |
|---|
| 11 | title, description = re.findall(r'^\s*([^\n]+)\s+(.*)$', readme, re.DOTALL)[0] |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | def setup(*args, **kwargs): |
|---|
| 15 | """Mangle setup to ignore media-relay on non-linux platforms""" |
|---|
| 16 | if sys.platform != 'linux2': |
|---|
| 17 | print "WARNING: skipping the media relay component as this is a non-linux platform" |
|---|
| 18 | kwargs.pop('ext_modules', None) |
|---|
| 19 | kwargs['scripts'].remove('media-relay') |
|---|
| 20 | _setup(*args, **kwargs) |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | setup(name = "mediaproxy", |
|---|
| 24 | version = mediaproxy.__version__, |
|---|
| 25 | author = "Ruud Klaver", |
|---|
| 26 | author_email = "ruud@ag-projects.com", |
|---|
| 27 | url = "http://www.ag-projects.com/MediaProxy.html", |
|---|
| 28 | description = title, |
|---|
| 29 | long_description = description, |
|---|
| 30 | license = "GPL", |
|---|
| 31 | platforms = ["Linux"], |
|---|
| 32 | classifiers = [ |
|---|
| 33 | #"Development Status :: 1 - Planning", |
|---|
| 34 | #"Development Status :: 2 - Pre-Alpha", |
|---|
| 35 | #"Development Status :: 3 - Alpha", |
|---|
| 36 | #"Development Status :: 4 - Beta", |
|---|
| 37 | "Development Status :: 5 - Production/Stable", |
|---|
| 38 | #"Development Status :: 6 - Mature", |
|---|
| 39 | #"Development Status :: 7 - Inactive", |
|---|
| 40 | "Intended Audience :: Service Providers", |
|---|
| 41 | "License :: GNU General Public License (GPL)", |
|---|
| 42 | "Operating System :: POSIX :: Linux", |
|---|
| 43 | "Programming Language :: Python", |
|---|
| 44 | "Programming Language :: C" |
|---|
| 45 | ], |
|---|
| 46 | packages = ['mediaproxy', 'mediaproxy.interfaces', 'mediaproxy.interfaces.accounting', 'mediaproxy.interfaces.system'], |
|---|
| 47 | scripts = ['media-relay', 'media-dispatcher'], |
|---|
| 48 | ext_modules = [ |
|---|
| 49 | Extension(name = 'mediaproxy.interfaces.system._conntrack', |
|---|
| 50 | sources = ['mediaproxy/interfaces/system/_conntrack.c', 'mediaproxy/interfaces/system/libiptc/libip4tc.c'], |
|---|
| 51 | depends = ['mediaproxy/interfaces/system/libiptc/libiptc.c', |
|---|
| 52 | 'mediaproxy/interfaces/system/libiptc/linux_list.h', |
|---|
| 53 | 'mediaproxy/interfaces/system/libiptc/include/libiptc/libiptc.h', |
|---|
| 54 | 'mediaproxy/interfaces/system/libiptc/include/libiptc/ipt_kernel_headers.h'], |
|---|
| 55 | include_dirs = ['mediaproxy/interfaces/system/libiptc/include'], |
|---|
| 56 | libraries = ["netfilter_conntrack"], |
|---|
| 57 | define_macros = [('MODULE_VERSION', mediaproxy.__version__), ('IPTABLES_VERSION', '"1.4.0"')]) |
|---|
| 58 | ] |
|---|
| 59 | ) |
|---|