~ev/uci-engine/quiet

« back to all changes in this revision

Viewing changes to ticket_system/setup.py

  • Committer: Chris Johnston
  • Date: 2013-12-09 17:29:57 UTC
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: chrisjohnston@ubuntu.com-20131209172957-y8vjn34zq17ugm8h
Add initial setup for the ticket system

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# Ubuntu CI Services
 
3
# Copyright 2013 Canonical Ltd.
 
4
 
 
5
# This program is free software: you can redistribute it and/or modify it
 
6
# under the terms of the GNU Affero General Public License version 3, as
 
7
# published by the Free Software Foundation.
 
8
 
 
9
# This program is distributed in the hope that it will be useful, but
 
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
12
# PURPOSE.  See the GNU Affero General Public License for more details.
 
13
 
 
14
# You should have received a copy of the GNU Affero General Public License
 
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 
 
17
import os
 
18
import sys
 
19
 
 
20
from setuptools import find_packages, setup
 
21
 
 
22
# ensure find_packages works if our current directory isn't this project
 
23
basedir = os.path.abspath(os.path.dirname(__file__))
 
24
os.chdir(basedir)
 
25
packages = find_packages(basedir)
 
26
 
 
27
if sys.argv[1] == 'create_db':
 
28
    import ticket_system.settings
 
29
    import ci_utils.create_db
 
30
    dbconfig = ticket_system.settings.DATABASES['default']
 
31
    exit(ci_utils.create_db.create_db(dbconfig))
 
32
 
 
33
import ticket_system
 
34
 
 
35
requires = [
 
36
    'Django==1.5',
 
37
    'django-tastypie==0.9.15',
 
38
    'South==0.7.5',
 
39
    'mock==1.0.1',
 
40
]
 
41
 
 
42
setup(
 
43
    name='ticket_system',
 
44
    version=ticket_system.__version__,
 
45
    description='Ticket system component of Ubuntu CI Services',
 
46
    author='Chris Johnston',
 
47
    author_email='chrisjohnston@ubuntu.com',
 
48
    license='AGPL',
 
49
    packages=packages,
 
50
    test_suite='tests',
 
51
    install_requires=requires,
 
52
)