This repository was archived by the owner on Feb 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
70 lines (56 loc) · 2.12 KB
/
setup.py
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
#!/usr/bin/env python2
import os
import sys
from distutils.core import setup, Command
DP_VERSION = '0.2.1'
def get_version():
return DP_VERSION
class CheckUpToDate(Command):
description = "Check if version strings are up to date"
user_options = []
def initialize_options(self):
self.cwd = None
def finalize_options(self):
self.cwd = os.getcwd()
def run(self):
version = get_version()
try:
with open("debian/changelog") as f:
firstline = f.readline()
if version not in firstline:
# returning false is not promoted
sys.exit(1)
except IOError:
# probably a release tarball without the debian directory but with Makefile
return True
# used to overwrite version tag by internal build tools
# keep it, even if you don't understand it.
def get_setup_version():
return get_version()
setup(
name='linstor-docker-volume',
version=get_setup_version(),
description='LINSTOR Docker Volume Plugin',
long_description="LINSTOR is a daemon and a command line utility that manages DRBD\n" +
"replicated volumes across a group of machines.\n" +
"It maintains DRBD configuration an the participating machines. It\n" +
"creates/deletes the backing LVM/ZFS volumes. It automatically places\n" +
"the backing devices among the participating machines.\n" +
"This provides a docker volume plugin for LINSTOR",
author='Roland Kammerer <[email protected]>',
author_email='[email protected]',
maintainer='LINBIT HA Solutions GmbH',
maintainer_email='[email protected]',
url='https://www.linbit.com',
license='GPLv3',
# scripts=['linstor-docker-volume'],
data_files=[
('/lib/systemd/system/', ['systemd/linstor-docker-volume.service',
'systemd/linstor-docker-volume.socket']),
('/usr/libexec/docker/', ['linstor-docker-volume']),
('/usr/share/man/man8/', ['linstor-docker-volume.8.gz']),
],
cmdclass={
'versionup2date': CheckUpToDate
}
)