Extract version to version.txt (#27149)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27149

Extract version to version.txt and add reading version logic to setup.py and fb/torch_version.py
ghstack-source-id: 91271883

Test Plan: N/A

Reviewed By: gchanan, ezyang

Differential Revision: D17689307

fbshipit-source-id: 21899502027cec71b63d9dc151e09ff5ff3f279d
This commit is contained in:
Pavel Belevich
2019-10-03 12:05:33 -07:00
committed by Facebook Github Bot
parent 7b2e8c323c
commit 493c900810
2 changed files with 2 additions and 1 deletions

View File

@ -257,7 +257,7 @@ cmake_python_include_dir = distutils.sysconfig.get_python_inc()
# Version, create_version_file, and package_name # Version, create_version_file, and package_name
################################################################################ ################################################################################
package_name = os.getenv('TORCH_PACKAGE_NAME', 'torch') package_name = os.getenv('TORCH_PACKAGE_NAME', 'torch')
version = '1.3.0a0' version = open('version.txt', 'r').read().strip()
sha = 'Unknown' sha = 'Unknown'
try: try:

1
version.txt Normal file
View File

@ -0,0 +1 @@
1.3.0a0