forked from microsoft/onnxscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
23 lines (18 loc) · 824 Bytes
/
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
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
"""NOTE: Put all metadata in pyproject.toml. Do not include complex logic in setup.py."""
import datetime
import os
import pathlib
import setuptools
# Logic for computing the development version number.
ROOT_DIR = pathlib.Path(__file__).parent
VERSION_FILE = ROOT_DIR / "VERSION"
version = VERSION_FILE.read_text().strip()
if os.environ.get("ONNX_SCRIPT_RELEASE") != "1":
date = datetime.date.today().strftime("%Y%m%d")
version = f"{version}.dev{date}"
# NOTE: Do not include other metadata in setup.py. Put it in pyproject.toml.
setuptools.setup(version=version)