scele / rules_python

Experimental Bazel Python Rules
Apache License 2.0
2 stars 8 forks source link

Overlay purelib contents correctly #33

Closed scele closed 4 years ago

scele commented 4 years ago

In tensorflow-1.15.0 wheel, there is a tensorflow_core directory both at the root of the wheel, as well as under the purelib directory. When extracting the wheel, piptool was using shutil.move to move the purelib/tensorflow_core to the wheel root, but it would end up in tensorflow_core/tensorflow_core. Use shutil.copy2 and shutil.rmtree to perform a "merging and overwriting" move instead.