This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
132 lines (124 loc) · 5.93 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/usr/bin/env python2
# Copyright 2017 Scality
#
# This file is part of Eve.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
from os.path import abspath, dirname, join
# Besides not advised,
# https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program
# That's the only sane way to parse requirements.txt
import pip
from setuptools import find_packages, setup
pip_major_version = int(pip.__version__.split(".")[0])
if pip_major_version >= 20:
from pip._internal.network.session import PipSession
from pip._internal.req import parse_requirements
elif pip_major_version >= 10:
from pip._internal.download import PipSession
from pip._internal.req import parse_requirements
else:
from pip.download import PipSession
from pip.req import parse_requirements
CWD = dirname(abspath(__file__))
def requires():
reqs_file = join(CWD, 'requirements/base.in')
reqs_install = parse_requirements(reqs_file, session=PipSession())
try:
return [str(ir.requirement) for ir in reqs_install]
except AttributeError:
return [str(ir.req) for ir in reqs_install]
setup(
name='eve',
description='Scality\'s automated build system',
url='https://bitbucket.org/scality/eve',
include_package_data=True,
packages=find_packages(where='.'),
install_requires=requires(),
use_scm_version={
'local_scheme': 'dirty-tag'
},
setup_requires=[
'setuptools_scm==5.0.2'
],
entry_points={
'console_scripts': [
'eve=eve.scripts.runner:main',
],
'buildbot.reporters': [
'BitbucketBuildStatusPush=eve.reporters.bitbucket:BitbucketBuildStatusPush',
'GithubBuildStatusPush=eve.reporters.github:GithubBuildStatusPush',
],
'buildbot.schedulers': [
'EveForceScheduler=eve.schedulers.force:EveForceScheduler',
],
'buildbot.steps': [
'CancelNonTipBuild=eve.steps.cancel:CancelNonTipBuild',
'CancelOldBuild=eve.steps.cancel:CancelOldBuild',
'DockerBuild=eve.steps.docker_build:DockerBuild',
'DockerCheckLocalImage=eve.steps.docker_build:DockerCheckLocalImage',
'DockerComputeImageFingerprint=eve.steps.docker_build:DockerComputeImageFingerprint',
'DockerPull=eve.steps.docker_build:DockerPull',
'DockerPush=eve.steps.docker_build:DockerPush',
'EveProperty=eve.steps.property:EveProperty',
'EvePropertyFromCommand=eve.steps.property:EvePropertyFromCommand',
'GetArtifactsFromStage=eve.steps.artifacts:GetArtifactsFromStage',
'JUnitShellCommand=eve.steps.junit:JUnitShellCommand',
'PublishCoverageReport=eve.steps.publish_coverage_report:PublishCoverageReport',
'ReadConfFromYaml=eve.steps.yaml_parser:ReadConfFromYaml',
'SetArtifactsName=eve.steps.artifacts:SetArtifactsName',
'SetArtifactsPrivateURL=eve.steps.artifacts:SetArtifactsPrivateURL',
'SetArtifactsPublicURL=eve.steps.artifacts:SetArtifactsPublicURL',
'SetBootstrapProperty=eve.steps.property:SetBootstrapProperty',
'SetBootstrapPropertyFromCommand=eve.steps.property:SetBootstrapPropertyFromCommand',
'SetBuilderId=eve.steps.property:SetBuilderId',
'SetBuildUrl=eve.steps.property:SetBuildUrl',
'SetWorkerDistro=eve.steps.distro:SetWorkerDistro',
'StepExtractor=eve.steps.yaml_parser:StepExtractor',
'PatcherConfig=eve.steps.patcher:PatcherConfig',
'TriggerStages=eve.steps.trigger_stages:TriggerStages',
'UnregisterRedhat=eve.steps.redhat:UnregisterRedhat',
'Upload=eve.steps.artifacts:Upload',
'Uploadv3=eve.steps.artifacts:Uploadv3',
],
'buildbot.util': [
'BaseBuildOrder=eve.util.build_order:BaseBuildOrder',
'BaseDockerBuildOrder=eve.util.build_order:BaseDockerBuildOrder',
'Patcher=eve.steps.patcher:Patcher',
'convert_to_bytes=eve.util.convert:convert_to_bytes',
'convert_to_cpus=eve.util.convert:convert_to_cpus',
'env=eve.util.env:SETTINGS',
'get_local_jobs=eve.util.local_jobs:get_local_jobs',
'hideStepIfSkipped=eve.util.step:hideStepIfSkipped',
'hideStepIfSuccess=eve.util.step:hideStepIfSuccess',
'hideStepIfSuccessOrSkipped=eve.util.step:hideStepIfSuccessOrSkipped',
'isRedhat=eve.util.redhat:isRedhat',
'load_env=eve.util.env:load_env',
'nextBootstrapBuild=eve.util.next_bootstrap_build:nextBootstrapBuild',
'password_generator=eve.util.password_generator:password_generator',
'step_factory=eve.util.step_factory:step_factory',
'verify_docker_certificates=eve.util.docker:verify_docker_certificates',
'replace_with_interpolate=eve.util.step_factory:replace_with_interpolate',
'create_hash=eve.util.hash:create_hash',
'compute_instance_name=eve.util.worker:compute_instance_name',
],
'buildbot.worker': [
'EveDockerLatentWorker=eve.worker.docker.docker_worker:EveDockerLatentWorker',
'HeatLatentWorker=eve.worker.openstack_heat.openstack_heat_worker:HeatLatentWorker',
'EveKubeLatentWorker=eve.worker.kubernetes.kubernetes_worker:EveKubeLatentWorker',
]
},
zip_safe=False
)