@@ -30,6 +30,9 @@ class CMakeBuild(build_ext):
3030 def build_extension (self , ext ): # noqa C901
3131 extdir = os .path .abspath (os .path .dirname (self .get_ext_fullpath (ext .name )))
3232
33+ # Ensure the extension goes into the pytorch_tokenizers package directory
34+ extdir = os .path .join (extdir , "pytorch_tokenizers" )
35+
3336 # Required for auto-detection & inclusion of auxiliary "native" libs
3437 if not extdir .endswith (os .path .sep ):
3538 extdir += os .path .sep
@@ -52,10 +55,6 @@ def build_extension(self, ext): # noqa C901
5255 ]
5356 build_args = ["--target" , "pytorch_tokenizers_cpp" ]
5457
55- # Use Clang for Windows builds.
56- if sys .platform == "win32" :
57- cmake_args += ["-T ClangCL" ]
58-
5958 # Adding CMake arguments set as environment variable
6059 # (needed e.g. to build for ARM OSX on conda-forge)
6160 if "CMAKE_ARGS" in os .environ :
@@ -133,7 +132,7 @@ def build_extension(self, ext): # noqa C901
133132 long_description_content_type = "text/markdown" ,
134133 url = "https://github.com/meta-pytorch/tokenizers" ,
135134 packages = find_packages (),
136- ext_modules = [CMakeExtension ("pytorch_tokenizers. pytorch_tokenizers_cpp" )],
135+ ext_modules = [CMakeExtension ("pytorch_tokenizers_cpp" )],
137136 cmdclass = {"build_ext" : CMakeBuild },
138137 zip_safe = False ,
139138 python_requires = ">=3.10" ,
0 commit comments