File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ def do_setup(package_data):
168168 "tests" ,
169169 "tests.*" ,
170170 ]
171- ),
171+ ) + [ "fairseq.model_parallel.megatron.mpu" ] ,
172172 package_data = package_data ,
173173 ext_modules = extensions ,
174174 test_suite = "tests" ,
@@ -201,12 +201,15 @@ def get_files(path, relative_to="fairseq"):
201201
202202try :
203203 # symlink config and examples into fairseq package so package_data accepts them
204- os .symlink (os .path .join (".." , "config" ), "fairseq/config" )
205- os .symlink (os .path .join (".." , "examples" ), "fairseq/examples" )
204+ installed = os .path .exists ("fairseq/config" )
205+ if not installed and "build_ext" not in sys .argv [1 :]:
206+ os .symlink (os .path .join (".." , "config" ), "fairseq/config" )
207+ os .symlink (os .path .join (".." , "examples" ), "fairseq/examples" )
206208 package_data = {
207209 "fairseq" : get_files ("fairseq/config" ) + get_files ("fairseq/examples" ),
208210 }
209211 do_setup (package_data )
210212finally :
211- os .unlink ("fairseq/config" )
212- os .unlink ("fairseq/examples" )
213+ if not installed and "build_ext" not in sys .argv [1 :]:
214+ os .unlink ("fairseq/config" )
215+ os .unlink ("fairseq/examples" )
You can’t perform that action at this time.
0 commit comments