10
10
11
11
from setuptools import find_packages , setup
12
12
13
- current_date = datetime .now ().strftime ("%Y.%m. %d" )
13
+ current_date = datetime .now ().strftime ("%Y%m %d" )
14
14
15
15
16
16
def get_git_commit_id ():
@@ -27,8 +27,6 @@ def read_version(file_path="version.txt"):
27
27
with open (file_path , "r" ) as file :
28
28
return file .readline ().strip ()
29
29
30
- # Determine the package name based on the presence of an environment variable
31
- package_name = "torchao-nightly" if os .environ .get ("TORCHAO_NIGHTLY" ) else "torchao"
32
30
33
31
# Use Git commit ID if VERSION_SUFFIX is not set
34
32
version_suffix = os .getenv ("VERSION_SUFFIX" )
@@ -37,9 +35,9 @@ def read_version(file_path="version.txt"):
37
35
38
36
use_cpp = os .getenv ('USE_CPP' )
39
37
40
-
41
- # Version is year. month. date if using nightlies
42
- version = current_date if package_name == "torchao-nightly" else read_version ()
38
+ version_prefix = read_version ()
39
+ # Version is version.dev year month date if using nightlies and version if not
40
+ version = f" { version_prefix } .dev { current_date } " if os . environ . get ( "TORCHAO_NIGHTLY" ) else version_prefix
43
41
44
42
import torch
45
43
@@ -124,7 +122,7 @@ def get_extensions():
124
122
return ext_modules
125
123
126
124
setup (
127
- name = package_name ,
125
+ name = "torchao" ,
128
126
version = version + version_suffix ,
129
127
packages = find_packages (),
130
128
include_package_data = True ,
0 commit comments