@@ -94,7 +94,7 @@ def get_extensions():
94
94
third_party_search_directories = []
95
95
96
96
runtime_library_dirs = None
97
- if sys .platform .startswith ('linux' ) or sys . platform . startswith ( 'darwin' ) :
97
+ if sys .platform .startswith ('linux' ):
98
98
sources = sources + source_image_cpu
99
99
libraries .append ('png' )
100
100
third_party_search_directories .append (os .path .join (cwd , "third_party/libpng" ))
@@ -222,7 +222,7 @@ def throw_of_failure(command):
222
222
223
223
def build_deps ():
224
224
this_dir = os .path .dirname (os .path .abspath (__file__ ))
225
- if sys .platform .startswith ('linux' ) or sys . platform . startswith ( 'darwin' ) :
225
+ if sys .platform .startswith ('linux' ):
226
226
cpu_count = multiprocessing .cpu_count ()
227
227
os .chdir ("third_party/zlib/" )
228
228
throw_of_failure ('cmake .' )
@@ -232,8 +232,6 @@ def build_deps():
232
232
zlib_path = os .path .join (this_dir , "third_party/zlib" )
233
233
if sys .platform .startswith ("linux" ):
234
234
libpng_cmake_options = "-DPNG_BUILD_ZLIB=ON -DPNG_STATIC=OFF -DZLIB_INCLUDE_DIR:PATH={zlib_path} -DZLIB_LIBRARY:FILEPATH={zlib_path}/libz.so" .format (zlib_path = zlib_path )
235
- if sys .platform .startswith ("darwin" ):
236
- libpng_cmake_options = "-DPNG_BUILD_ZLIB=ON -DPNG_STATIC=OFF -DZLIB_INCLUDE_DIR:PATH={zlib_path} -DZLIB_LIBRARY:FILEPATH={zlib_path}/libz.dylib" .format (zlib_path = zlib_path )
237
235
os .chdir ("third_party/libpng/" )
238
236
os .system ('cmake {} .' .format (libpng_cmake_options ))
239
237
throw_of_failure ("cmake --build . -- -j {}" .format (cpu_count ))
@@ -253,14 +251,6 @@ def build_ext_with_dependencies(self):
253
251
'third_party/libpng/libpng.so' ])
254
252
]
255
253
256
- if sys .platform .startswith ('darwin' ):
257
- data_files = [
258
- ('torchvision/lib' , [
259
- 'third_party/zlib/libz.dylib' ,
260
- 'third_party/libpng/libpng.dylib' ])
261
- ]
262
-
263
-
264
254
setup (
265
255
# Metadata
266
256
name = package_name ,
0 commit comments