2020-01-16 14:33:44 +01:00
|
|
|
from __future__ import print_function
|
2014-03-05 18:15:25 +01:00
|
|
|
from setuptools import setup
|
2014-04-05 01:08:57 +02:00
|
|
|
from subprocess import call
|
|
|
|
import sys
|
2015-06-24 01:02:55 +02:00
|
|
|
import os
|
|
|
|
|
|
|
|
# Change directory since setuptools uses relative paths
|
|
|
|
script_path = os.path.dirname(os.path.realpath(__file__))
|
2020-01-16 14:33:44 +01:00
|
|
|
print(script_path)
|
2015-06-24 01:02:55 +02:00
|
|
|
os.chdir(script_path)
|
2014-04-05 01:08:57 +02:00
|
|
|
|
|
|
|
# Allows us to avoid installing the upstart init script when deploying airtime_analyzer
|
|
|
|
# on Airtime Pro:
|
|
|
|
if '--no-init-script' in sys.argv:
|
|
|
|
data_files = []
|
2014-04-05 01:46:59 +02:00
|
|
|
sys.argv.remove('--no-init-script') # super hax
|
2014-04-05 01:08:57 +02:00
|
|
|
else:
|
2017-03-08 12:39:59 +01:00
|
|
|
data_files = [('/etc/init', ['install/upstart/airtime_analyzer.conf']),
|
|
|
|
('/etc/init.d', ['install/sysvinit/airtime_analyzer'])]
|
2020-01-16 14:33:44 +01:00
|
|
|
print(data_files)
|
2014-03-05 18:15:25 +01:00
|
|
|
|
|
|
|
setup(name='airtime_analyzer',
|
|
|
|
version='0.1',
|
|
|
|
description='Airtime Analyzer Worker and File Importer',
|
|
|
|
url='http://github.com/sourcefabric/Airtime',
|
|
|
|
author='Albert Santoni',
|
|
|
|
author_email='albert.santoni@sourcefabric.org',
|
|
|
|
license='MIT',
|
|
|
|
packages=['airtime_analyzer'],
|
|
|
|
scripts=['bin/airtime_analyzer'],
|
2020-01-16 14:48:17 +01:00
|
|
|
install_requires=[
|
2020-11-16 20:38:25 +01:00
|
|
|
'mutagen==1.42.0',
|
2020-03-04 03:16:14 +01:00
|
|
|
'pika~=1.1.0',
|
2020-01-16 14:48:17 +01:00
|
|
|
'file-magic',
|
|
|
|
'nose',
|
|
|
|
'coverage',
|
|
|
|
'mock',
|
2020-01-16 15:32:51 +01:00
|
|
|
'python-daemon',
|
2020-01-16 14:48:17 +01:00
|
|
|
'requests>=2.7.0',
|
2020-11-16 20:38:25 +01:00
|
|
|
'rgain3==1.0.0',
|
|
|
|
'pycairo==1.19.1',
|
|
|
|
'PyGObject<=3.36.1',
|
2020-01-16 14:48:17 +01:00
|
|
|
# These next 3 are required for requests to support SSL with SNI. Learned this the hard way...
|
|
|
|
# What sucks is that GCC is required to pip install these.
|
|
|
|
#'ndg-httpsclient',
|
|
|
|
#'pyasn1',
|
|
|
|
#'pyopenssl'
|
|
|
|
],
|
2014-04-05 01:08:57 +02:00
|
|
|
zip_safe=False,
|
|
|
|
data_files=data_files)
|
|
|
|
|
2017-02-28 14:07:34 +01:00
|
|
|
# Remind users to reload the initctl config so that "service start airtime_analyzer" works
|
2014-04-05 01:08:57 +02:00
|
|
|
if data_files:
|
2020-01-16 14:33:44 +01:00
|
|
|
print("Remember to reload the initctl configuration")
|
|
|
|
print("Run \"sudo initctl reload-configuration; sudo service airtime_analyzer restart\" now.")
|
|
|
|
print("Or on Ubuntu Xenial (16.04)")
|
|
|
|
print("Remember to reload the systemd configuration")
|
|
|
|
print("Run \"sudo systemctl daemon-reload; sudo service airtime_analyzer restart\" now.")
|