-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsetup.utils.py
More file actions
78 lines (60 loc) · 1.51 KB
/
setup.utils.py
File metadata and controls
78 lines (60 loc) · 1.51 KB
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
import os
import setuptools
import setup
own_dir = os.path.abspath(os.path.dirname(__file__))
ODG_CLIENT_VERSION_FILE = os.path.join(own_dir, 'ODG_CLIENT_VERSION')
def read_version(file: str) -> str:
with open(file) as f:
return f.read().strip()
def requirements():
yield f'odg-client=={read_version(ODG_CLIENT_VERSION_FILE)}'
with open(os.path.join(own_dir, 'requirements.utils.txt')) as f:
for line in f.readlines():
line = line.strip()
if not line or line.startswith('#'):
continue
yield line
def modules():
return [
'caching',
'consts',
'crypto_extension.config',
'ctx_util',
'dockerutil',
'eol',
'github_util',
'lookups',
'ocm_util',
'paths',
'rescore.model',
'rescore.utility',
'responsibles_extension.filters',
'responsibles_extension.strategies',
'util',
'syft',
]
def packages():
return [
'deliverydb_cache',
'k8s',
'odg',
'secret_mgmt',
'osinfo',
'bdba_utils',
]
def package_data():
return {
'odg': ['*.yaml'],
'secret_mgmt': ['*.yaml'],
}
setuptools.setup(
name='delivery-gear-utils',
version=os.environ.get(
'ODG_UTILS_PACKAGE_VERSION',
setup.finalize_version(),
),
py_modules=modules(),
packages=packages(),
package_data=package_data(),
install_requires=list(requirements()),
)