Completed
Push — master ( 0bc61b...16fc24 )
by Thomas
8s
created

doorpi/metadata.py (2 issues)

1
# -*- coding: utf-8 -*-
2
"""Project metadata
3
4
Information describing the project.
5
"""
6
import os
7
8
# The package name, which is also the "UNIX name" for the project.
9
package = 'DoorPi'
10
project = "VoIP Door-Intercomstation with Raspberry Pi"
11
project_no_spaces = project.replace(' ', '')
12
version = '2.5.0.0'
13
description = 'provide intercomstation to the doorstation by VoIP'
14
keywords = ['intercom', 'VoIP', 'doorstation', 'home automation', 'IoT']
15
authors = ['Thomas Meissner']
16
authors_emails = emails = ['[email protected]']
17
authors_string = ', '.join(authors)
18
author_strings = []
19
for name, email in zip(authors, authors_emails):
20
    author_strings.append('{0} <{1}>'.format(name, email))
21
22
supporters = [
23
    'Phillip Munz <[email protected]>',
24
    'Hermann Dötsch <[email protected]>',
25
    'Dennis Häußler <[email protected]>',
26
    'Hubert Nusser <[email protected]>',
27
    'Michael Hauer <[email protected]>',
28
    'Andreas Schwarz <[email protected]>',
29
    'Max Rößler <[email protected]>',
30
    'missing someone? -> sorry -> mail me'
31
]
32
supporter_string = '\n'.join(supporters)
33
copyright = "%s, 2014-2015" % authors[0]
0 ignored issues
show
Bug Best Practice introduced by Thomas
This seems to re-define the built-in copyright.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
34
license = 'CC BY-NC 4.0'
0 ignored issues
show
Bug Best Practice introduced by Thomas
This seems to re-define the built-in license.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
35
url = 'https://github.com/motom001/DoorPi'
36
url_raw = 'https://raw.githubusercontent.com/motom001/DoorPi'
37
38
# created with: http://patorjk.com/software/taag/#p=display&f=Ogre&t=DoorPi
39
epilog = '''
40
    ___                  ___ _
41
   /   \___   ___  _ __ / _ (_)  {project}
42
  / /\ / _ \ / _ \| '__/ /_)/ |  version:   {version}
43
 / /_// (_) | (_) | | / ___/| |  license:   {license}
44
/___,' \___/ \___/|_| \/    |_|  URL:       <{url}>
45
46
Authors:    {authors}
47
Supporter:  {supporters}
48
'''.format(
49
        license = license,
50
        project = project,
51
        version = version,
52
        authors = '\n'.join(author_strings),
53
        supporters = '\n            '.join(supporters),
54
        url = url)
55
56
57
if os.name == 'posix':
58
    doorpi_path = os.path.join('/usr/local/etc', package)
59
60
    pidfile = '/var/run/%s.pid' % package.lower()
61
62
    daemon_name = package.lower()
63
    daemon_folder = '/etc/init.d'
64
    daemon_file = os.path.join(daemon_folder, daemon_name)
65
66
    daemon_online_template = url_raw+'/master/'+'doorpi/docs/service/doorpi.tpl'
67
68
    daemon_args = '--configfile $DOORPI_PATH/conf/doorpi.ini'
69
    doorpi_executable = '/usr/local/bin/doorpi_cli'
70
    log_folder = '%s/log' % doorpi_path
71
    if not os.path.exists(doorpi_path):
72
        os.makedirs(doorpi_path)
73
else:
74
    raise Exception('os unknown')
75
76
77