| pytorch_pkgconfig.py (013a555157cefb861605c4e4ea6ce4e03bb7c3d7) | pytorch_pkgconfig.py (637c7b11eaf8aa85ae3f6db9c10f649d172df128) |
|---|---|
| 1from pathlib import Path 2import torch 3import torch.utils.cpp_extension as C 4import torch.utils as tutils 5import re 6 7build_dir = Path('./build') | 1from pathlib import Path 2import torch 3import torch.utils.cpp_extension as C 4import torch.utils as tutils 5import re 6 7build_dir = Path('./build') |
| 8if not build_dir.is_dir(): 9 build_dir.mkdir() |
|
| 8pkgconfig_path = build_dir / 'libtorch.pc' 9 10variables = {} 11keywords = {} 12 13 14def add_variable(file, variable, value): 15 file.write(f"{variable}={value}\n") --- 54 unchanged lines hidden --- | 10pkgconfig_path = build_dir / 'libtorch.pc' 11 12variables = {} 13keywords = {} 14 15 16def add_variable(file, variable, value): 17 file.write(f"{variable}={value}\n") --- 54 unchanged lines hidden --- |