Skip to content

Commit

Permalink
Enable ABI suffix for extension module
Browse files Browse the repository at this point in the history
When installing torchaudio from source `python setup.py install` performs
egg (zip) installation. This causes confusion when building from source for
multiple environments with different Python versions, as `_torchaudio.so`
does not have Python ABI version in its name and importlib cannot find it.

This change fixs this by enableing ABI extension.

squash! Enable ABI suffix for extension module
  • Loading branch information
mthrok committed Jul 31, 2020
1 parent dab7f64 commit ec108a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def run(self):
packages=find_packages(exclude=["build*", "test*", "torchaudio.csrc*", "third_party*", "build_tools*"]),
ext_modules=setup_helpers.get_ext_modules(),
cmdclass={
'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True)
'build_ext': setup_helpers.BuildExtension,
},
install_requires=[pytorch_package_dep]
)

0 comments on commit ec108a1

Please sign in to comment.