-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·99 lines (89 loc) · 2.93 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright (C) 2012-2020 Chris Cummins.
#
# This file is part of emu.
#
# Emu is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# Emu 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 General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with emu. If not, see <http://www.gnu.org/licenses/>.
import os
from setuptools import setup
from setuptools.command.test import test as TestCommand
# Directory to install man pages to.
man_prefix = os.environ.get("EMU_MANDIR", "/usr/share/man")
man_dir = man_prefix + "/man1/"
class PyTestCommand(TestCommand):
description = 'run test suite'
user_options = []
def run_tests(self):
import emu.test
emu.test.testsuite()
def read_requirements(path='requirements.txt'):
with open(path) as infile:
return [x.strip() for x in infile.readlines() if x.strip()]
setup(name="emu",
version="0.3.0",
description=("Fast, incremental, rotating backups"),
url="https://github.com/ChrisCummins/emu",
author="Chris Cummins",
author_email="[email protected]",
license="GNU GPL v3",
packages=[
"emu",
"emu.test",
],
package_data={
'emu': [
'static/site.js',
'static/styles.css',
'templates/sink-templates/config',
'templates/source-templates/config',
'templates/source-templates/excludes',
'templates/source-templates/hooks/exec/log.error.sample',
'templates/source-templates/hooks/exec/mount-remote.post.sample',
'templates/source-templates/hooks/exec/mount-remote.pre.sample',
'templates/source-templates/hooks/push/email-report.post.sample',
'templates/source-templates/hooks/push/email.error.sample',
'templates/source-templates/hooks/push/log-start.pre.sample',
'templates/timeline.html',
]
},
data_files=[
(man_dir, [
'man/emu.1',
'man/emu-clean.1',
'man/emu-init.1',
'man/emu-log.1',
'man/emu-prune.1',
'man/emu-pull.1',
'man/emu-push.1',
'man/emu-sink.1',
])
],
scripts=[
'bin/emu',
'bin/emu-clean',
'bin/emu-init',
'bin/emu-log',
'bin/emu-monitor',
'bin/emu-prune',
'bin/emu-pull',
'bin/emu-push',
'bin/emu-sink',
],
test_suite="nose.collector",
tests_require=[
"coverage",
"nose",
],
install_requires=read_requirements("emu/requirements.txt"),
cmdclass={"test": PyTestCommand},
zip_safe=False)