robotframework-robotlog2db 1.5.4__tar.gz → 1.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. robotframework_robotlog2db-1.6.0/MANIFEST.in +1 -0
  2. robotframework_robotlog2db-1.6.0/PKG-INFO +361 -0
  3. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/README.rst +35 -17
  4. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/RobotLog2DB/RobotLog2DB.pdf +0 -0
  5. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/RobotLog2DB/__init__.py +1 -1
  6. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/RobotLog2DB/__main__.py +1 -1
  7. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/RobotLog2DB/robotlog2db.py +1 -1
  8. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/RobotLog2DB/version.py +3 -3
  9. robotframework_robotlog2db-1.6.0/build_backend.py +97 -0
  10. robotframework_robotlog2db-1.6.0/pyproject.toml +133 -0
  11. robotframework_robotlog2db-1.6.0/robotframework_robotlog2db.egg-info/PKG-INFO +361 -0
  12. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/robotframework_robotlog2db.egg-info/SOURCES.txt +3 -1
  13. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/robotframework_robotlog2db.egg-info/entry_points.txt +0 -1
  14. robotframework_robotlog2db-1.6.0/robotframework_robotlog2db.egg-info/requires.txt +13 -0
  15. robotframework-robotlog2db-1.5.4/PKG-INFO +0 -313
  16. robotframework-robotlog2db-1.5.4/robotframework_robotlog2db.egg-info/PKG-INFO +0 -313
  17. robotframework-robotlog2db-1.5.4/robotframework_robotlog2db.egg-info/requires.txt +0 -4
  18. robotframework-robotlog2db-1.5.4/setup.py +0 -226
  19. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/RobotLog2DB/xsd/robot.xsd +0 -0
  20. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/robotframework_robotlog2db.egg-info/dependency_links.txt +0 -0
  21. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/robotframework_robotlog2db.egg-info/top_level.txt +0 -0
  22. {robotframework-robotlog2db-1.5.4 → robotframework_robotlog2db-1.6.0}/setup.cfg +0 -0
@@ -0,0 +1 @@
1
+ include build_backend.py
@@ -0,0 +1,361 @@
1
+ Metadata-Version: 2.4
2
+ Name: robotframework-robotlog2db
3
+ Version: 1.6.0
4
+ Summary: Imports robot results to TestResultWebApp database
5
+ Author-email: Tran Duy Ngoan <Ngoan.TranDuy@vn.bosch.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://pypi.org/project/robotframework-robotlog2db/
8
+ Project-URL: Documentation, https://github.com/test-fullautomation/robotframework-robotlog2db/blob/develop/RobotLog2DB/RobotLog2DB.pdf
9
+ Project-URL: Readme, https://github.com/test-fullautomation/robotframework-robotlog2db/blob/develop/README.rst
10
+ Project-URL: Repository, https://github.com/test-fullautomation/robotframework-robotlog2db
11
+ Project-URL: Issues, https://github.com/test-fullautomation/robotframework-robotlog2db/issues
12
+ Keywords: robotframework,robot,results,TestResultWebApp,database
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Topic :: Software Development
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/x-rst
20
+ Requires-Dist: robotframework>=6.1
21
+ Requires-Dist: colorama
22
+ Requires-Dist: lxml
23
+ Requires-Dist: mysqlclient
24
+ Requires-Dist: GenPackageDoc
25
+ Requires-Dist: PythonExtensionsCollection
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=6.0; extra == "dev"
28
+ Requires-Dist: pytest-cov>=3.0; extra == "dev"
29
+ Provides-Extra: docs
30
+ Requires-Dist: docutils>=0.22.4; extra == "docs"
31
+
32
+ RobotLog2DB
33
+ ===========
34
+
35
+ Table of Contents
36
+ -----------------
37
+
38
+ - `Getting Started <#getting-started>`__
39
+
40
+ - `How to install <#how-to-install>`__
41
+ - `Usage <#usage>`__
42
+ - `Example <#example>`__
43
+ - `Contribution <#contribution>`__
44
+ - `Sourcecode Documentation <#sourcecode-documentation>`__
45
+ - `Feedback <#feedback>`__
46
+ - `About <#about>`__
47
+
48
+ - `Maintainers <#maintainers>`__
49
+ - `Contributors <#contributors>`__
50
+ - `License <#license>`__
51
+
52
+ Getting Started
53
+ ---------------
54
+
55
+ **RobotLog2DB** is a command-line tool that enables you to import `Robot
56
+ Framework XML result`_ files into TestResultWebApp_'s database for
57
+ presenting an overview about the whole test execution and detail of each test
58
+ result.
59
+
60
+ **RobotLog2DB** tool is operating system independent and only works with
61
+ Python 3.
62
+
63
+ How to install
64
+ ~~~~~~~~~~~~~~
65
+
66
+ **RobotLog2DB** can be installed in two different ways.
67
+
68
+ 1. Installation via PyPi (recommended for users)
69
+
70
+ .. code::
71
+
72
+ pip install robotframework-robotlog2db
73
+
74
+ `RobotLog2DB in PyPi <https://pypi.org/project/robotframework-robotlog2db/>`_
75
+
76
+ 2. Installation via GitHub (recommended for developers)
77
+
78
+ * Clone the **robotframework-robotlog2db** repository to your machine.
79
+
80
+ .. code::
81
+
82
+ git clone https://github.com/test-fullautomation/robotframework-robotlog2db.git
83
+
84
+ `RobotLog2DB in GitHub <https://github.com/test-fullautomation/robotframework-robotlog2db>`_
85
+
86
+ * Use the following command to install **RobotLog2DB** (executed in repository main folder):
87
+
88
+ .. code::
89
+
90
+ python -m pip install .
91
+
92
+ Or:
93
+
94
+ .. code::
95
+
96
+ python -m pip install --proxy <proxy> .
97
+
98
+ This command will also download and install all dependencies that are required to work with the source files in the current repository.
99
+ After the initial installation of **RobotLog2DB** is done, you have the following two possibilities:
100
+
101
+ 1. *Clean the previous installation*:
102
+
103
+ .. code::
104
+
105
+ python "./cleanup_installation.py"
106
+
107
+ ``cleanup_installation.py`` explicitly deletes all files and folders within the component installation folder under
108
+ ``site-packages`` and also deletes local build artefacts.
109
+
110
+ 2. *Render the component documentation*:
111
+
112
+ .. code::
113
+
114
+ python "./genpackagedoc.py"
115
+
116
+ This would e.g. be required in case of changes in the interface of **RobotLog2DB**.
117
+
118
+ The documentation is rendered by a separate application called **GenPackageDoc**, that is part
119
+ of the build dependencies and runtime dependencies of **RobotLog2DB**.
120
+
121
+ **GenPackageDoc** needs to be configured. Details about how to do this, can be found in the
122
+ `README.rst <https://github.com/test-fullautomation/python-genpackagedoc/blob/develop/README.rst>`_
123
+ (sections *Install dependencies* and *Configure dependencies*).
124
+
125
+ * Use the following command to build **RobotLog2DB** (executed in repository main folder):
126
+
127
+ .. code::
128
+
129
+ python -m build .
130
+
131
+ Or:
132
+
133
+ .. code::
134
+
135
+ python -m pip config set global.proxy <proxy>
136
+ python -m build .
137
+
138
+ After succesful installation, the executable file **RobotLog2DB**
139
+ will be available (under *Scripts* folder of Python on Windows
140
+ and *~/.local/bin/* folder on Linux).
141
+
142
+ In case above location is added to **PATH** environment variable
143
+ then you can run it directly as operation system's command.
144
+
145
+ Usage
146
+ -----
147
+
148
+ **RobotLog2DB** requires the Robot Framework result file(s) which contains the
149
+ output result in XML format (default name is ``output.xml``) and
150
+ TestResultWebApp_'s database information for importing.
151
+
152
+ Use below command to get tools's usage
153
+
154
+ ::
155
+
156
+ RobotLog2DB -h
157
+
158
+
159
+ The usage should be showed as below:
160
+
161
+ ::
162
+
163
+ usage: RobotLog2DB (RobotXMLResult to TestResultWebApp importer) [-h] [-v] [--recursive] [--dryrun] [--append] [--UUID UUID] [--variant VARIANT] [--versions VERSIONS] [--config CONFIG]
164
+ resultxmlfile server user password database
165
+
166
+ RobotLog2DB imports XML result files (default: output.xml) generated by the Robot Framework into a WebApp database.
167
+
168
+ positional arguments:
169
+ resultxmlfile absolute or relative path to the result file or directory of result files to be imported.
170
+ server server which hosts the database (IP or URL).
171
+ user user for database login.
172
+ password password for database login.
173
+ database database schema for database login.
174
+
175
+ optional arguments:
176
+ -h, --help show this help message and exit
177
+ -v, --version version of the RobotLog2DB importer.
178
+ --recursive if set, then the path is searched recursively for output files to be imported.
179
+ --dryrun if set, then verify all input arguments (includes DB connection) and show what would be done.
180
+ --append is used in combination with --UUID <UUID>.If set, allow to append new result(s) to existing execution result UUID in --UUID argument.
181
+ --UUID UUID UUID used to identify the import and version ID on webapp. If not provided RobotLog2DB will generate an UUID for the whole import.
182
+ --variant VARIANT variant name to be set for this import.
183
+ --versions VERSIONS metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).
184
+ --config CONFIG configuration json file for component mapping information.
185
+ --interface {db,rest}
186
+ database access interface.
187
+ --testrunurl TESTRUNURL
188
+ link to test execution job: Jenkins job, Gitlab CI/CD pipeline, ...
189
+
190
+ The below command is simple usage with all required arguments to import
191
+ Robot Framework results into TestResultWebApp's database:
192
+
193
+ ::
194
+
195
+ RobotLog2DB <resultxmlfile> <server> <user> <password> <database>
196
+
197
+ Besides the executable file, you can also run tool as a Python module
198
+
199
+ ::
200
+
201
+ python -m RobotLog2DB <resultxmlfile> <server> <user> <password> <database>
202
+
203
+
204
+ Example
205
+ -------
206
+
207
+ In order the import the Robot Framework result(s) to TestResultWebApp's database,
208
+ we need the Robot Framework result file (``output.xml``).
209
+
210
+ So, firstly execute the Robot Framework testcase(s) to get the Robot Framework result file.
211
+
212
+ Sample Robot Framework testcase which contains neccessary information for importing into
213
+ TestResultWebApp's database:
214
+
215
+ ::
216
+
217
+ *** Settings ***
218
+ # Test execution level
219
+ Metadata project ROBFW # Project/Variant
220
+ Metadata version_sw SW_VERSION_0.1 # Software version
221
+ Metadata version_hw HW_VERSION_0.1 # Hardware version
222
+ Metadata version_test TEST_VERSION_0.1 # Test version
223
+
224
+ # File/Suite level
225
+ Documentation This is description for Robot Framework test file
226
+ Metadata author Tran Duy Ngoan (RBVH/ECM1)
227
+ Metadata component Import_Tools
228
+ Metadata testtool Robot Framework 3.2rc2 (Python 3.9.0 on win32)
229
+ Metadata machine %{COMPUTERNAME}
230
+ Metadata tester %{USER}
231
+
232
+ *** Test Cases ***
233
+ Testcase 01
234
+ [Tags] ISSUE-001 TCID-1001 FID-112 FID-111
235
+ Log This is Testcase 01
236
+
237
+ Testcase 02
238
+ [Tags] ISSUE-RTC-003 TCID-1002 FID-113
239
+ Log This is Testcase 01
240
+
241
+
242
+ Notes:
243
+ ~~~~~~
244
+
245
+ In case you are using RobotFramework AIO, these below ``Metadata``
246
+ definitions will be handled implicitly by `RobotFramework Testsuites
247
+ Management`_ library within Suite Setup.
248
+
249
+ * project
250
+ * version_sw
251
+ * version_hw
252
+ * version_test
253
+ * machine
254
+ * tester
255
+ * testtool
256
+
257
+ So that you do not need to define them in your Robot Framework testcase(s).
258
+
259
+ However, if these ``Metadata`` definitions are already missing in the
260
+ Robot Framework output result file, you can specific them when executing the
261
+ **RobotLog2DB** tool with the optional arguments:
262
+
263
+ * ``--variant VARIANT``: Project definitions
264
+ * ``--versions VERSIONS``: Versions (Software;Hardware;Test) definitions.
265
+ * ``--config CONFIG``: Project, versions or component mapping definitions.
266
+
267
+ Please refer to `RobotLog2DB tool’s Documentation`_ for more detail about
268
+ these optional arguments.
269
+
270
+ After getting Robot Framework result file (``output.xml``), use below sample
271
+ command to import that result into TestResultWebApp's database which is hosted
272
+ at *localhost* as below sample command
273
+
274
+ ::
275
+
276
+ RobotLog2DB output.xml localhost test_user test_pw test_db
277
+
278
+ Then, open TestResultWebApp with your favourite browser and you will see how
279
+ wonderful the execution result is displayed as below figures:
280
+
281
+ Dashboard view:
282
+
283
+ .. image:: https://github.com/test-fullautomation/robotframework-robotlog2db/blob/develop/packagedoc/additional_docs/pictures/Dashboard.png?raw=true
284
+ :alt: Dashboard view
285
+
286
+ Datatable view:
287
+
288
+ .. image:: https://github.com/test-fullautomation/robotframework-robotlog2db/blob/develop/packagedoc/additional_docs/pictures/Datatable.png?raw=true
289
+ :alt: Datatable view
290
+
291
+ Contribution
292
+ ------------
293
+ We are always searching support and you are cordially invited to help to improve
294
+ **RobotLog2DB** tool.
295
+
296
+ Sourcecode Documentation
297
+ ------------------------
298
+ To understand more detail about the tool's features, parameters and how Robot Framework
299
+ testcase information will be displayed on TestResultWebApp, please refer to
300
+ `RobotLog2DB tool’s Documentation`_.
301
+
302
+ Feedback
303
+ --------
304
+ Please feel free to give any feedback to us via
305
+
306
+ Email to: `Thomas Pollerspöck`_
307
+
308
+ Issue tracking: `RobotLog2DB Issues`_
309
+
310
+ About
311
+ -----
312
+
313
+ Maintainers
314
+ ~~~~~~~~~~~
315
+ `Thomas Pollerspöck`_
316
+
317
+ `Tran Duy Ngoan`_
318
+
319
+ Contributors
320
+ ~~~~~~~~~~~~
321
+
322
+ `Nguyen Huynh Tri Cuong`_
323
+
324
+ `Mai Dinh Nam Son`_
325
+
326
+ `Tran Hoang Nguyen`_
327
+
328
+ `Holger Queckenstedt`_
329
+
330
+ License
331
+ ~~~~~~~
332
+
333
+ Copyright 2020-2023 Robert Bosch GmbH
334
+
335
+ Licensed under the Apache License, Version 2.0 (the "License");
336
+ you may not use this file except in compliance with the License.
337
+ You may obtain a copy of the License at
338
+
339
+ |License: Apache v2|
340
+
341
+ Unless required by applicable law or agreed to in writing, software
342
+ distributed under the License is distributed on an "AS IS" BASIS,
343
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
344
+ See the License for the specific language governing permissions and
345
+ limitations under the License.
346
+
347
+
348
+ .. |License: Apache v2| image:: https://img.shields.io/pypi/l/robotframework.svg
349
+ :target: http://www.apache.org/licenses/LICENSE-2.0.html
350
+ .. _RobotLog2DB: https://github.com/test-fullautomation/robotframework-robotlog2db
351
+ .. _TestResultWebApp: https://github.com/test-fullautomation/TestResultWebApp
352
+ .. _Thomas Pollerspöck: mailto:Thomas.Pollerspoeck@de.bosch.com
353
+ .. _Tran Duy Ngoan: mailto:Ngoan.TranDuy@vn.bosch.com
354
+ .. _Nguyen Huynh Tri Cuong: mailto:Cuong.NguyenHuynhTri@vn.bosch.com
355
+ .. _Mai Dinh Nam Son: mailto:Son.MaiDinhNam@vn.bosch.com
356
+ .. _Tran Hoang Nguyen: mailto:Nguyen.TranHoang@vn.bosch.com
357
+ .. _Holger Queckenstedt: mailto:Holger.Queckenstedt@de.bosch.com
358
+ .. _RobotLog2DB tool’s Documentation: https://github.com/test-fullautomation/robotframework-robotlog2db/blob/develop/RobotLog2DB/RobotLog2DB.pdf
359
+ .. _RobotLog2DB Issues: https://github.com/test-fullautomation/robotframework-robotlog2db/issues
360
+ .. _RobotFramework Testsuites Management: https://github.com/test-fullautomation/robotframework-testsuitesmanagement
361
+ .. _Robot Framework XML result: https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#output-file
@@ -52,39 +52,57 @@ How to install
52
52
 
53
53
  `RobotLog2DB in GitHub <https://github.com/test-fullautomation/robotframework-robotlog2db>`_
54
54
 
55
- * Install dependencies
55
+ * Use the following command to install **RobotLog2DB** (executed in repository main folder):
56
56
 
57
- **RobotLog2DB** requires some additional Python libraries. Before you install the cloned repository sources
58
- you have to install the dependencies manually. The names of all related packages you can find in the file ``requirements.txt``
59
- in the repository root folder. Use pip to install them:
57
+ .. code::
58
+
59
+ python -m pip install .
60
+
61
+ Or:
60
62
 
61
63
  .. code::
62
64
 
63
- pip install -r ./requirements.txt
65
+ python -m pip install --proxy <proxy> .
64
66
 
65
- Additionally install **LaTeX** (recommended: TeX Live). This is used to render the documentation.
67
+ This command will also download and install all dependencies that are required to work with the source files in the current repository.
68
+ After the initial installation of **RobotLog2DB** is done, you have the following two possibilities:
66
69
 
67
- * Configure dependencies
70
+ 1. *Clean the previous installation*:
68
71
 
69
- The installation of **RobotLog2DB** includes to generate the documentation in PDF format. This is done by
70
- an application called **GenPackageDoc**, that is part of the installation dependencies (see ``requirements.txt``).
72
+ .. code::
71
73
 
72
- **GenPackageDoc** uses **LaTeX** to generate the documentation in PDF format. Therefore **GenPackageDoc** needs to know where to find
73
- **LaTeX**. This is defined in the **GenPackageDoc** configuration file
74
+ python "./cleanup_installation.py"
74
75
 
75
- .. code::
76
+ ``cleanup_installation.py`` explicitly deletes all files and folders within the component installation folder under
77
+ ``site-packages`` and also deletes local build artefacts.
78
+
79
+ 2. *Render the component documentation*:
80
+
81
+ .. code::
76
82
 
77
- packagedoc\packagedoc_config.json
83
+ python "./genpackagedoc.py"
78
84
 
79
- Before you start the installation you have to introduce the following environment variable, that is used in ``packagedoc_config.json``:
85
+ This would e.g. be required in case of changes in the interface of **RobotLog2DB**.
86
+
87
+ The documentation is rendered by a separate application called **GenPackageDoc**, that is part
88
+ of the build dependencies and runtime dependencies of **RobotLog2DB**.
89
+
90
+ **GenPackageDoc** needs to be configured. Details about how to do this, can be found in the
91
+ `README.rst <https://github.com/test-fullautomation/python-genpackagedoc/blob/develop/README.rst>`_
92
+ (sections *Install dependencies* and *Configure dependencies*).
93
+
94
+ * Use the following command to build **RobotLog2DB** (executed in repository main folder):
95
+
96
+ .. code::
80
97
 
81
- - ``GENDOC_LATEXPATH`` : path to ``pdflatex`` executable
98
+ python -m build .
82
99
 
83
- * Use the following command to install **RobotLog2DB**:
100
+ Or:
84
101
 
85
102
  .. code::
86
103
 
87
- python setup.py install
104
+ python -m pip config set global.proxy <proxy>
105
+ python -m build .
88
106
 
89
107
  After succesful installation, the executable file **RobotLog2DB**
90
108
  will be available (under *Scripts* folder of Python on Windows
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2023 Robert Bosch GmbH
1
+ # Copyright 2020-2026 Robert Bosch GmbH
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2023 Robert Bosch GmbH
1
+ # Copyright 2020-2026 Robert Bosch GmbH
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2023 Robert Bosch GmbH
1
+ # Copyright 2020-2026 Robert Bosch GmbH
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # **************************************************************************************************************
2
2
  #
3
- # Copyright 2020-2023 Robert Bosch GmbH
3
+ # Copyright 2020-2026 Robert Bosch GmbH
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -18,5 +18,5 @@
18
18
  #
19
19
  # Version and date of RobotLog2DB
20
20
  #
21
- VERSION = "1.5.4"
22
- VERSION_DATE = "04.02.2025"
21
+ VERSION = "1.6.0"
22
+ VERSION_DATE = "24.02.2026"
@@ -0,0 +1,97 @@
1
+ # **************************************************************************************************************
2
+ #
3
+ # Copyright 2020-2026 Robert Bosch GmbH
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ # **************************************************************************************************************
18
+ #
19
+ """
20
+ Custom Build Backend
21
+
22
+ Currently reserved for future development
23
+ """
24
+
25
+ import sys
26
+ import logging
27
+
28
+ from pathlib import Path
29
+ from typing import Dict, Optional
30
+
31
+ from setuptools.build_meta import (
32
+ build_wheel as _build_wheel,
33
+ build_sdist as _build_sdist,
34
+ )
35
+
36
+ project_root = Path(__file__).parent
37
+ sys.path.insert(0, str(project_root))
38
+
39
+ logging.basicConfig(level=logging.INFO, stream=sys.stderr)
40
+ logger = logging.getLogger(__name__)
41
+
42
+ # --------------------------------------------------------------------------------------------------------------
43
+
44
+ SUCCESS = 0
45
+ ERROR = 1
46
+
47
+ # --------------------------------------------------------------------------------------------------------------
48
+
49
+ class BuildManager:
50
+ """
51
+ Custom Build Backend
52
+ """
53
+
54
+ def __init__(self):
55
+ pass
56
+
57
+ def run_pre_build_steps(self) -> int:
58
+ """
59
+ Custom build steps
60
+ """
61
+ # logger.info("Entering pre build process")
62
+ # !!! reserved for future development !!!
63
+ # logger.info("Leaving pre build process")
64
+
65
+ return SUCCESS
66
+
67
+ # eof class BuildManager:
68
+
69
+ build_backend = BuildManager()
70
+
71
+ def build_wheel(
72
+ wheel_directory: str,
73
+ config_settings: Optional[Dict] = None,
74
+ metadata_directory: Optional[str] = None
75
+ ) -> str:
76
+ logger.info("Entering build_wheel")
77
+ returnval = build_backend.run_pre_build_steps()
78
+ if returnval != SUCCESS:
79
+ raise Exception(f"Execution of pre_build_steps failed with error code {returnval}. Premature end of build_wheel.")
80
+ build_wheel_return = _build_wheel(wheel_directory, config_settings, metadata_directory)
81
+ logger.info("Leaving build_wheel")
82
+ return build_wheel_return
83
+
84
+
85
+ def build_sdist(
86
+ sdist_directory: str,
87
+ config_settings: Optional[Dict] = None
88
+ ) -> str:
89
+ logger.info("Entering build_sdist")
90
+ returnval = build_backend.run_pre_build_steps()
91
+ if returnval != SUCCESS:
92
+ raise Exception(f"Execution of pre_build_steps failed with error code {returnval}. Premature end of build_sdist.")
93
+ build_sdist_return = _build_sdist(sdist_directory, config_settings)
94
+ logger.info("Leaving build_sdist")
95
+ return build_sdist_return
96
+
97
+ # --------------------------------------------------------------------------------------------------------------