aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
blob: 640901f7b2281f32426a41dc9702d5912a62dfd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# -*- coding: utf-8 -*-

###
#   Copyright (C) 2013
#   Fraunhofer Institute for Open Communication Systems (FOKUS)
#   Competence Center NETwork research (NET), St. Augustin, GERMANY
#       Alton MacDonald <alton.kenneth.macdonald@fokus.fraunhofer.de>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU Affero General Public License as published by
#  the Free Software Foundation; either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Affero General Public License for more details.
#
#  You should have received a copy of the GNU Affero General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
###

import os, sys
import multiprocessing

from setuptools import setup, find_packages
from setuptools.command.install import install

class custom_install(install):
    def run(self):
        from subprocess import call
        install.run(self)
        call(['/usr/sbin/update-rc.d', 'osmocom-oohmi', 'defaults'])

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()

requires = [
    'pyramid',
    'pyramid_mako',
    'pyramid_debugtoolbar',
    'pyramid_exclog',
    'waitress',
    'nose',
    'coverage'
    ]
    
data_files=[('/etc/openbsc', ['production.ini']),
            ('/etc/init.d', ['osmocom-oohmi'])]

setup(name='osmo_oohmi',
      version='0.0',
      description='osmo_oohmi',
      long_description=README + '\n\n' + CHANGES,
      license='AGPLv3',
      classifiers=[
        "Programming Language :: Python",
        "Framework :: Pyramid",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
        "License :: OSI Approved :: GNU Affero General Public License v3",
        ],
      author='Alton MacDonald',
      author_email='alton.kenneth.macdonald@fokus.fraunhofer.de',
      url='http://git.osmocom.org/python/osmo-oohmi/',
      keywords='openbsc web pyramid pylons',
      packages=find_packages(),
      data_files=data_files,
      include_package_data=True,
      zip_safe=False,
      install_requires=requires,
      tests_require=requires,
      test_suite="nose.collector",
      entry_points="""\
      [paste.app_factory]
      main = hlr_mgmt:main
      """,
      cmdclass={'install': custom_install}
      )