Bugfix nightly checkout tool to work on Windows (#49274)
Summary:
I am submitting this PR on behalf of Janne Hellsten(nurpax) from NVIDIA, for the convenience of CLA. Thanks Janne a lot for the contribution!
This fixes the bug when running `
./tools/nightly.py checkout -b my-nightly-branch` on windows. Before this fix, this command gets the following error on Windows.
```
ERROR:root:Fatal exception
Traceback (most recent call last):
File "./tools/nightly.py", line 166, in logging_manager
yield root_logger
File "./tools/nightly.py", line 644, in main
install(
File "./tools/nightly.py", line 552, in install
spdir = _site_packages(pytdir.name, platform)
File "./tools/nightly.py", line 325, in _site_packages
os.path.join(pytdir.name, "Lib", "site-packages")
NameError: name 'pytdir' is not defined
log file: d:\pytorch\nightly\log\2020-12-11_16h10m14s_6867a21e-3c0e-11eb-878e-04ed3363a33e\nightly.log
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/49274
Reviewed By: H-Huang
Differential Revision: D25808156
Pulled By: malfet
fbshipit-source-id: 00778016366ab771fc3fb152710c7849210640fb