microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
.pyproject/backend.py
34lines · modecode
| 1 | # -*- coding: utf-8 -*- |
| 2 | # Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | # Licensed under the MIT License. See License.txt in the project root for |
| 4 | # license information. |
| 5 | ########################################################################### |
| 6 | |
| 7 | import os |
| 8 | import sys |
| 9 | from setuptools import build_meta as _orig |
| 10 | from setuptools.build_meta import * # noqa: F401, F403 |
| 11 | |
| 12 | # add the current directory to the path, so we can import setup_cmds.py |
| 13 | sys.path.append(os.path.dirname(__file__)) |
| 14 | import cmdclass as _cmds # noqa: E402 |
| 15 | |
| 16 | |
| 17 | def build_wheel(wheel_directory, config_settings=None, |
| 18 | metadata_directory=None): |
| 19 | _cmds.CommandMixin.config_settings = config_settings |
| 20 | |
| 21 | return _orig.build_wheel( |
| 22 | wheel_directory, config_settings, |
| 23 | metadata_directory |
| 24 | ) |
| 25 | |
| 26 | |
| 27 | def build_editable(wheel_directory, config_settings=None, |
| 28 | metadata_directory=None): |
| 29 | _cmds.CommandMixin.config_settings = config_settings |
| 30 | |
| 31 | return _orig.build_editable( |
| 32 | wheel_directory, config_settings, |
| 33 | metadata_directory |
| 34 | ) |
| 35 | |