diff --git a/setup.py b/setup.py index 71d6747143..d4cf988b43 100644 --- a/setup.py +++ b/setup.py @@ -15,6 +15,9 @@ def read_requirements(file_path): with open(file_path, "r") as file: return file.read().splitlines() +def read_version(file_path="version.txt"): + with open(file_path, "r") as file: + return file.readline().strip() # Determine the package name based on the presence of an environment variable package_name = "torchao-nightly" if os.environ.get("TORCHAO_NIGHTLY") else "torchao" @@ -23,7 +26,7 @@ def read_requirements(file_path): # Version is year.month.date if using nightlies -version = current_date if package_name == "torchao-nightly" else "0.2.0" +version = current_date if package_name == "torchao-nightly" else read_version() import torch diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000..0d91a54c7d --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.3.0