Skip to content

Commit 3b05589

Browse files
authored
Set zip_safe = False to disable egg installation (#842)
Currently `setuptools` assumes that torhcaudio is zip safe and performs egg (zip) installation when `python setup.py install` (or `pip install .`). When `torchaudio` loads extension module written with Torchscript, the corresponding loading function requires the `so` file to be present as an actual file, and this does not work well with egg installation. This CC fixes this by setting `zip_safe=False` in setup.py and disable egg installation, so that `python setup.py install` installs uncompressed files with regular directory structure.
1 parent 11b00d5 commit 3b05589

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,6 @@ def run(self):
8585
cmdclass={
8686
'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True)
8787
},
88-
install_requires=[pytorch_package_dep]
88+
install_requires=[pytorch_package_dep],
89+
zip_safe=False,
8990
)

0 commit comments

Comments
 (0)