File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 30
30
31
31
# Install tokenizers
32
32
pip install . -v
33
+ pip install pytest
33
34
34
35
# Run tests
35
36
pytest
Original file line number Diff line number Diff line change 37
37
38
38
# Install tokenizers
39
39
${CONDA_RUN} pip install . -v
40
+ ${CONDA_RUN} pip install pytest
41
+
40
42
41
43
# Run tests
42
44
${CONDA_RUN} pytest
Original file line number Diff line number Diff line change @@ -142,16 +142,13 @@ if(TOKENIZERS_BUILD_PYTHON)
142
142
# Set properties for the Python extension
143
143
target_compile_definitions (pytorch_tokenizers_cpp PRIVATE VERSION_INFO=${PROJECT_VERSION} )
144
144
145
- # Set the output name and location
145
+ # Set the output name - let setuptools handle the output directory
146
146
set_target_properties (pytorch_tokenizers_cpp PROPERTIES
147
147
OUTPUT_NAME "pytorch_tokenizers_cpp"
148
148
)
149
149
150
- # Install the Python extension
151
- install (TARGETS pytorch_tokenizers_cpp
152
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
153
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
154
- )
150
+ # Don't install the Python extension here - let setuptools handle it
151
+ # The install() command is not needed for Python extensions built via setuptools
155
152
endif ()
156
153
157
154
# Installation rules
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ class CMakeBuild(build_ext):
29
29
def build_extension (self , ext ):
30
30
extdir = os .path .abspath (os .path .dirname (self .get_ext_fullpath (ext .name )))
31
31
32
+ # Ensure the extension goes into the pytorch_tokenizers package directory
33
+ extdir = os .path .join (extdir , "pytorch_tokenizers" )
34
+
32
35
# Required for auto-detection & inclusion of auxiliary "native" libs
33
36
if not extdir .endswith (os .path .sep ):
34
37
extdir += os .path .sep
You can’t perform that action at this time.
0 commit comments