-
Notifications
You must be signed in to change notification settings - Fork 29
/
setup.py
76 lines (61 loc) · 1.85 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
import setuptools
import os
own_dir = os.path.abspath(os.path.dirname(__file__))
def requirements():
yield 'gardener-oci>=' + version()
yield 'gardener-ocm>=' + version()
with open(os.path.join(own_dir, 'requirements.txt')) as f:
for line in f.readlines():
line = line.strip()
if not line or line.startswith('#'):
continue
yield line
def modules():
module_names = [
os.path.basename(os.path.splitext(module)[0]) for module in
os.scandir(path=own_dir)
if module.is_file() and module.name.endswith('.py')
]
# avoid including other setup-scripts
module_names.remove('setup.oci')
module_names.remove('setup.ocm')
module_names.remove('setup.whd')
return module_names
def packages():
package_names = setuptools.find_packages()
# remove packages (distributed via separate distribution-packages)
package_names.remove('whd')
package_names.remove('oci')
package_names.remove('ocm')
return package_names
def version():
with open(os.path.join(own_dir, 'ci', 'VERSION')) as f:
return f.read().strip()
setuptools.setup(
name='gardener-cicd-libs',
version=version(),
description='Gardener CI/CD Libraries',
long_description='Gardener CI/CD Libraries',
long_description_content_type='text/markdown',
python_requires='>=3.10',
py_modules=modules(),
packages=packages(),
package_data={
'':['*.mako'],
'ci': ['VERSION'],
'concourse':[
'resources/LAST_RELEASED_TAG',
'resources/*.mako',
'*.mako',
],
'gci':[
'ocm-component-descriptor-schema.yaml',
],
'ocm':[
'ocm-component-descriptor-schema.yaml',
],
},
install_requires=list(requirements()),
entry_points={
},
)