1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-05 20:11:08 +08:00

Share version number (#620)

This commit is contained in:
you-n-g
2021-09-27 16:12:12 +08:00
committed by GitHub
parent 45ea4bae4e
commit 55b6ff123e
4 changed files with 13 additions and 6 deletions

1
MANIFEST.in Normal file
View File

@@ -0,0 +1 @@
include qlib/VERSION.txt

1
VERSION.txt Normal file
View File

@@ -0,0 +1 @@
0.7.1.99

View File

@@ -1,17 +1,15 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from pathlib import Path
__version__ = "0.7.1"
_version_path = Path(__file__).absolute().parent / "VERSION.txt" # This file is copyed from setup.py
__version__ = _version_path.read_text(encoding="utf-8").strip()
__version__bak = __version__ # This version is backup for QlibConfig.reset_qlib_version
import os
import yaml
import logging
import platform
import subprocess
from pathlib import Path
from .log import get_module_logger

View File

@@ -11,7 +11,14 @@ NAME = "pyqlib"
DESCRIPTION = "A Quantitative-research Platform"
REQUIRES_PYTHON = ">=3.5.0"
VERSION = "0.7.1"
from pathlib import Path
from shutil import copyfile
CURRENT_DIR = Path(__file__).absolute().parent
_version_src = CURRENT_DIR / "VERSION.txt"
_version_dst = CURRENT_DIR / "qlib" / "VERSION.txt"
copyfile(_version_src, _version_dst)
VERSION = _version_dst.read_text(encoding="utf-8").strip()
# Detect Cython
try: