@@ -72,7 +72,7 @@ def is_exe(fpath):
7272
7373def build_libtrtorch_pre_cxx11_abi (develop = True , use_dist_dir = True , cxx11_abi = False ):
7474 cmd = [BAZEL_EXE , "build" ]
75- cmd .append ("//cpp/lib :libtrtorch.so " )
75+ cmd .append ("//:libtrtorch" )
7676 if develop :
7777 cmd .append ("--compilation_mode=dbg" )
7878 else :
@@ -106,7 +106,6 @@ def gen_version_file():
106106 print ("creating version file" )
107107 f .write ("__version__ = \" " + __version__ + '\" ' )
108108
109-
110109def copy_libtrtorch (multilinux = False ):
111110 if not os .path .exists (dir_path + '/trtorch/lib' ):
112111 os .makedirs (dir_path + '/trtorch/lib' )
@@ -115,7 +114,7 @@ def copy_libtrtorch(multilinux=False):
115114 if multilinux :
116115 copyfile (dir_path + "/build/libtrtorch_build/libtrtorch.so" , dir_path + '/trtorch/lib/libtrtorch.so' )
117116 else :
118- copyfile ( dir_path + "/ ../bazel-bin/cpp/lib/ libtrtorch.so" , dir_path + ' /trtorch/lib/libtrtorch.so' )
117+ os . system ( "tar -xzf ../bazel-bin/libtrtorch.tar.gz --strip-components=2 -C " + dir_path + " /trtorch" )
119118
120119
121120class DevelopCommand (develop ):
@@ -258,9 +257,12 @@ def run(self):
258257 python_requires = '>=3.6' ,
259258 include_package_data = True ,
260259 package_data = {
261- 'trtorch' : ['lib/*.so' ],
260+ 'trtorch' : ['lib/*' ,
261+ 'include/trtorch/*.h' ,
262+ 'include/trtorch/core/**/*.h' ,
263+ 'bin/*' ],
262264 },
263265 exclude_package_data = {
264- '' : ['*.cpp' , '*.h' ],
266+ '' : ['*.cpp' ],
265267 'trtorch' : ['csrc/*.cpp' ],
266268 })
0 commit comments