mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
* Use copies instead of symbolic files * bug fix * Remove useless item
This commit is contained in:
committed by
Soumith Chintala
parent
d0f395f744
commit
5651695a99
4
.gitignore
vendored
4
.gitignore
vendored
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
9
setup.py
9
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
|
||||
|
@ -1 +0,0 @@
|
||||
../../aten/src/ATen/common_with_cwrap.py
|
Reference in New Issue
Block a user