diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 2a4fa65..df0a328 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -48,13 +48,6 @@ jobs: \$ErrorActionPreference = 'Stop' \$PSNativeCommandUseErrorActionPreference = \$true - # Create a symbolic link to work around path length limitations. This gives a much shorter - # path, as the default checkout directory is deeply nested. - \$workingDir = \$PWD.Path - cd \$Env:GITHUB_WORKSPACE - New-Item -ItemType SymbolicLink -Path tk -Value \$workingDir - cd tk - # Run C++ unit tests cmake -DCMAKE_BUILD_TYPE=Debug test -Bbuild/test -T ClangCL cmake --build build/test -j9 --config Debug diff --git a/setup.py b/setup.py index 6b7f4fc..2f5c361 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,9 @@ import os import re +import shutil import subprocess import sys -import shutil from pathlib import Path from setuptools import Extension, find_packages, setup @@ -53,6 +53,7 @@ def build_extension(self, ext): # noqa C901 "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", ] build_args = ["--target", "pytorch_tokenizers_cpp"] + build_tool_args: list[str] = [] # Use Clang for Windows builds. if sys.platform == "win32": @@ -82,6 +83,7 @@ def build_extension(self, ext): # noqa C901 pass else: + build_tool_args = ["--", "/p:TrackFileAccess=false"] # Single config generators are handled "normally" single_config = any(x in cmake_generator for x in {"NMake", "Ninja"}) @@ -124,7 +126,9 @@ def build_extension(self, ext): # noqa C901 ["cmake", ext.sourcedir] + cmake_args, cwd=build_temp, check=True ) subprocess.run( - ["cmake", "--build", "."] + build_args, cwd=build_temp, check=True + ["cmake", "--build", "."] + build_args + build_tool_args, + cwd=build_temp, + check=True, )