Removed many unnecessary files and started changing pypo to use setuptools

This commit is contained in:
Duncan Sommerville 2014-12-17 16:22:40 -05:00
parent 144923c353
commit 97805ad271
169 changed files with 5 additions and 8620 deletions

View file

@ -1,12 +0,0 @@
bin_dir = "/usr/lib/airtime/api_clients"
# Value needed to access the API
api_key = 'AAA'
# Path to the base of the API
api_base = 'api'
# Hostname
host = 'localhost'
base_port = 80
base_dir = '/'

View file

@ -1,31 +0,0 @@
import os
import shutil
import sys
from configobj import ConfigObj
def get_current_script_dir():
return os.path.dirname(os.path.realpath(__file__))
def copy_dir(src_dir, dest_dir):
if (os.path.exists(dest_dir)) and (dest_dir != "/"):
shutil.rmtree(dest_dir)
if not (os.path.exists(dest_dir)):
#print "Copying directory "+os.path.realpath(src_dir)+" to "+os.path.realpath(dest_dir)
shutil.copytree(src_dir, dest_dir)
PATH_INI_FILE = '/etc/airtime/api_client.cfg'
current_script_dir = get_current_script_dir()
if not os.path.exists(PATH_INI_FILE):
shutil.copy('%s/../api_client.cfg'%current_script_dir, PATH_INI_FILE)
"""load config file"""
try:
config = ConfigObj("%s/../api_client.cfg" % current_script_dir)
except Exception, e:
print 'Error loading config file: ', e
sys.exit(1)
#copy python files
copy_dir("%s/../../api_clients"%current_script_dir, config["bin_dir"])

View file

@ -1,21 +0,0 @@
import os
import sys
from configobj import ConfigObj
def remove_path(path):
os.system('rm -rf "%s"' % path)
def get_current_script_dir():
return os.path.dirname(os.path.realpath(__file__))
current_script_dir = get_current_script_dir()
"""load config file"""
try:
config = ConfigObj("%s/../api_client.cfg" % current_script_dir)
except Exception, e:
print 'Error loading config file: ', e
sys.exit(1)
print " * Removing API Client files"
remove_path(config["bin_dir"])