summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rwxr-xr-x.jenkins/pytorch/win-build.sh2
-rw-r--r--README.md2
-rw-r--r--setup.py9
l---------tools/shared/cwrap_common.py1
5 files changed, 13 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 839049ffcf..29eb2fe454 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,6 +57,9 @@ test/data/linear.pt
# macOS dir files
.DS_Store
+# Symbolic files
+tools/shared/cwrap_common.py
+
# Ninja files
.ninja_deps
.ninja_log
@@ -144,6 +147,7 @@ cmake_build
gen
.setuptools-cmake-build
.pytest_cache
+aten/build/*
# Bram
plsdontbreak
diff --git a/.jenkins/pytorch/win-build.sh b/.jenkins/pytorch/win-build.sh
index eb0131f1a9..f3bb383cb2 100755
--- a/.jenkins/pytorch/win-build.sh
+++ b/.jenkins/pytorch/win-build.sh
@@ -76,8 +76,6 @@ set DISTUTILS_USE_SDK=1
set CMAKE_GENERATOR=Ninja
-xcopy /Y aten\\src\\ATen\\common_with_cwrap.py tools\\shared\\cwrap_common.py
-
set NO_CUDA=1
python setup.py install
diff --git a/README.md b/README.md
index 40fc7b9419..c622daa7e2 100644
--- a/README.md
+++ b/README.md
@@ -209,8 +209,6 @@ MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
On Windows
```cmd
-xcopy /Y aten\src\ATen\common_with_cwrap.py tools\shared\cwrap_common.py
-
set "VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build"
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
set DISTUTILS_USE_SDK=1
diff --git a/setup.py b/setup.py
index 218b7ba4e8..5645598b6f 100644
--- a/setup.py
+++ b/setup.py
@@ -293,6 +293,15 @@ class build_deps(Command):
libs += ['THD']
build_libs(libs)
+ # Use copies instead of symbolic files.
+ # Windows has very poor support for them.
+ sym_files = ['tools/shared/cwrap_common.py']
+ orig_files = ['aten/src/ATen/common_with_cwrap.py']
+ for sym_file, orig_file in zip(sym_files, orig_files):
+ if os.path.exists(sym_file):
+ os.remove(sym_file)
+ shutil.copyfile(orig_file, sym_file)
+
# Copy headers necessary to compile C++ extensions.
#
# This is not perfect solution as build does not depend on any of
diff --git a/tools/shared/cwrap_common.py b/tools/shared/cwrap_common.py
deleted file mode 120000
index 383d0f481e..0000000000
--- a/tools/shared/cwrap_common.py
+++ /dev/null
@@ -1 +0,0 @@
-../../aten/src/ATen/common_with_cwrap.py \ No newline at end of file