forked from philips-labs/igtcloud-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
52 lines (47 loc) · 1.69 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
"""
distutils/setuptools install script.
"""
from setuptools import setup, find_namespace_packages
def dev_scheme(version):
time_format = "%Y%m%d"
# If branch is dev(elop), use versioning: X.Y.devZ
# For other branches use: X.Y.devZ+commitSHA
# in both cases a datetime is appended if repo is dirty
dev_branches = ['dev', 'develop', 'master']
if version.exact or version.node is None or version.branch in dev_branches:
return version.format_choice("",
"+d{time:{time_format}}",
time_format=time_format)
else:
return version.format_choice("+{node}",
"+{node}.d{time:{time_format}}",
time_format=time_format)
requires = []
requirements_files = ['requirements.txt']
for file in requirements_files:
with open(file, mode='r') as f:
for line in f:
if not line.startswith('-'):
line = line.strip()
if line:
requires.append(line)
setup(
name='igtcloudclient',
use_scm_version={'write_to': 'src/igtcloud/client/__version__.py', 'local_scheme': dev_scheme},
author='Koen de Laat (Philips)',
license="MIT",
author_email='[email protected]',
url='https://www.philips.com',
description='IGT Cloud client',
package_dir={"": "src"},
packages=find_namespace_packages(include=['igtcloud.*'], where="src"),
install_requires=requires,
classifiers=[
'Programming Language :: Python :: 3.9',
],
entry_points={
'console_scripts': [
'igtcloud = igtcloud.client.tools.cli:cli'
]
}
)