-
Notifications
You must be signed in to change notification settings - Fork 24
/
setup.py
52 lines (41 loc) · 1.14 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
#-*- coding: utf-8 -*-
import os
import shutil
from distutils.core import setup
if not os.path.exists('build/pip'):
os.makedirs('build/pip')
shutil.copyfile('bin/tracer.py', 'build/tracer')
with open("requirements.txt") as f:
install_requires = f.read().splitlines()
with open("tracer.spec", "rb") as f:
version = next(iter(filter(lambda l:l.startswith('Version:'),
f.read().decode("utf-8").splitlines()))).split()[1]
data_files = []
if hasattr(os, 'geteuid') and os.geteuid() == 0:
data_files = [('/etc/bash_completion.d', ['scripts/tracer.bash_completion']),]
setup(
name='tracer',
version=version,
author='FrostyX',
author_email='frostyx@email.cz',
url='http://tracer-package.com/',
license='LICENSE',
description='Finds outdated running applications in your system',
long_description=open('README.md').read(),
install_requires=install_requires,
data_files=data_files,
packages=[
'tracer',
'tracer.controllers',
'tracer.packageManagers',
'tracer.resources',
'tracer.views',
'tracer.views.resource',
'data',
],
scripts=['build/tracer'],
package_data={'data': [
'applications.xml',
'rules.xml',
]},
)