SAAS-853 - Celery backend for SoundCloud uploads
This commit is contained in:
parent
f031d13867
commit
626489bb3b
27 changed files with 813 additions and 250 deletions
45
python_apps/airtime-celery/setup.py
Normal file
45
python_apps/airtime-celery/setup.py
Normal file
|
@ -0,0 +1,45 @@
|
|||
from setuptools import setup
|
||||
from subprocess import call
|
||||
import os
|
||||
import sys
|
||||
|
||||
install_args = ['install', 'install_data', 'develop']
|
||||
|
||||
# Definitely not the best way of doing this...
|
||||
if sys.argv[1] in install_args:
|
||||
data_files = [('/etc/default', ['install/conf/airtime-celery']),
|
||||
('/etc/init.d', ['install/upstart/airtime-celery'])]
|
||||
else:
|
||||
data_files = []
|
||||
|
||||
|
||||
def postinst():
|
||||
print "Reloading initctl configuration"
|
||||
call(['initctl', 'reload-configuration'])
|
||||
# Make /etc/init.d file executable and set proper
|
||||
# permissions for the defaults config file
|
||||
os.chmod('/etc/init.d/airtime-celery', 0755)
|
||||
os.chmod('/etc/default/airtime-celery', 0640)
|
||||
print "Setting uploader to start on boot"
|
||||
call(['update-rc.d', 'airtime-celery', 'defaults'])
|
||||
print "Run \"sudo service airtime-celery restart\" now."
|
||||
|
||||
setup(name='airtime-celery',
|
||||
version='0.1',
|
||||
description='Airtime Celery service',
|
||||
url='http://github.com/sourcefabric/Airtime',
|
||||
author='Sourcefabric',
|
||||
author_email='duncan.sommerville@sourcefabric.org',
|
||||
license='MIT',
|
||||
packages=['airtime-celery'],
|
||||
install_requires=[
|
||||
'soundcloud',
|
||||
'celery',
|
||||
'kombu'
|
||||
],
|
||||
zip_safe=False,
|
||||
data_files=data_files)
|
||||
|
||||
if data_files:
|
||||
postinst()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue