[setup] fixed nightly release (#5388)

This commit is contained in:
Frank Lee
2024-02-27 15:19:13 +08:00
committed by GitHub
parent bf34c6fef6
commit dcdd8a5ef7
3 changed files with 45 additions and 17 deletions

View File

@@ -1,6 +1,5 @@
import os
import sys
from datetime import datetime
from typing import List
from setuptools import find_packages, setup
@@ -15,7 +14,6 @@ except ImportError:
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
BUILD_EXT = int(os.environ.get("BUILD_EXT", "0")) == 1
IS_NIGHTLY = int(os.environ.get("NIGHTLY", "0")) == 1
# we do not support windows currently
if sys.platform == "win32":
@@ -96,23 +94,15 @@ if BUILD_EXT:
else:
ext_modules = []
# always put not nightly branch as the if branch
# otherwise github will treat colossalai-nightly as the project name
# and it will mess up with the dependency graph insights
if not IS_NIGHTLY:
version = get_version()
package_name = "colossalai"
else:
# use date as the nightly version
version = datetime.today().strftime("%Y.%m.%d")
package_name = "colossalai-nightly"
version = get_version()
package_name = "colossalai"
setup(
name=package_name,
version=version,
packages=find_packages(
exclude=(
"op_builder",
"extensions",
"benchmark",
"docker",
"tests",