@@ -72,7 +72,7 @@ def is_exe(fpath):
72
72
73
73
def build_libtrtorch_pre_cxx11_abi (develop = True , use_dist_dir = True , cxx11_abi = False ):
74
74
cmd = [BAZEL_EXE , "build" ]
75
- cmd .append ("//cpp/lib :libtrtorch.so " )
75
+ cmd .append ("//:libtrtorch" )
76
76
if develop :
77
77
cmd .append ("--compilation_mode=dbg" )
78
78
else :
@@ -106,7 +106,6 @@ def gen_version_file():
106
106
print ("creating version file" )
107
107
f .write ("__version__ = \" " + __version__ + '\" ' )
108
108
109
-
110
109
def copy_libtrtorch (multilinux = False ):
111
110
if not os .path .exists (dir_path + '/trtorch/lib' ):
112
111
os .makedirs (dir_path + '/trtorch/lib' )
@@ -115,7 +114,7 @@ def copy_libtrtorch(multilinux=False):
115
114
if multilinux :
116
115
copyfile (dir_path + "/build/libtrtorch_build/libtrtorch.so" , dir_path + '/trtorch/lib/libtrtorch.so' )
117
116
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" )
119
118
120
119
121
120
class DevelopCommand (develop ):
@@ -258,9 +257,12 @@ def run(self):
258
257
python_requires = '>=3.6' ,
259
258
include_package_data = True ,
260
259
package_data = {
261
- 'trtorch' : ['lib/*.so' ],
260
+ 'trtorch' : ['lib/*' ,
261
+ 'include/trtorch/*.h' ,
262
+ 'include/trtorch/core/**/*.h' ,
263
+ 'bin/*' ],
262
264
},
263
265
exclude_package_data = {
264
- '' : ['*.cpp' , '*.h' ],
266
+ '' : ['*.cpp' ],
265
267
'trtorch' : ['csrc/*.cpp' ],
266
268
})
0 commit comments