mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
19 lines
521 B
Python
19 lines
521 B
Python
import os.path
|
|
|
|
from setuptools.command.build_ext import build_ext
|
|
|
|
|
|
class BuildExtension(build_ext):
|
|
"""A custom build extension for adding compiler-specific options."""
|
|
|
|
def build_extensions(self):
|
|
for extension in self.extensions:
|
|
extension.extra_compile_args = ['-std=c++11']
|
|
build_ext.build_extensions(self)
|
|
|
|
|
|
def include_paths():
|
|
here = os.path.abspath(__file__)
|
|
torch_path = os.path.dirname(os.path.dirname(here))
|
|
return [os.path.join(torch_path, 'lib', 'include')]
|