forked from canonical/ubuntu-pro-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
47 lines (39 loc) · 1.33 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
# Copyright (C) 2019 Canonical Ltd.
# This file is part of ubuntu-advantage-client. See LICENSE file for license.
import glob
import setuptools
from uaclient import defaults, version
NAME = 'ubuntu-advantage-tools'
INSTALL_REQUIRES = open('requirements.txt').read().rstrip('\n').split('\n')
TEST_REQUIRES = open('test-requirements.txt').read().rstrip('\n').split('\n')
def _get_version():
parts = version.get_version().split('-')
if len(parts) == 1:
return parts[0]
major_minor, _subrev, _commitish = parts
return major_minor
setuptools.setup(
name=NAME,
version=_get_version(),
packages=setuptools.find_packages(
exclude=['*.testing', 'tests.*', '*.tests', 'tests']
),
data_files=[
('/etc/ubuntu-advantage', ['uaclient.conf']),
('/usr/share/keyrings', glob.glob('keyrings/*')),
(defaults.CONFIG_DEFAULTS['data_dir'], [])
],
install_requires=INSTALL_REQUIRES,
extras_require=dict(test=TEST_REQUIRES),
author='Ubuntu Server Team',
author_email='[email protected]',
description=('Manage Ubuntu Advantage support entitlements'),
license='GPLv3',
url='https://ubuntu.com/support',
entry_points={
'console_scripts': [
'ubuntu-advantage=uaclient.cli:main',
'ua=uaclient.cli:main'
]
}
)