mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[bazel] add python targets (#101003)
This PR adds bazel python, so that bazel build could be used from python like `import torch`. Notable changes: - Add the python targets. - Add the version.py.tpl generation. - In order to archive the `USE_GLOBAL_DEPS = False` just for the bazel build, employ a monkey-patch hack in the mentioned `version.py.tpl`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/101003 Approved by: https://github.com/huydhn
This commit is contained in:
committed by
PyTorch MergeBot
parent
4434b9af6a
commit
630593d3cc
@ -54,6 +54,13 @@ http_archive(
|
||||
urls = [
|
||||
"https://github.com/google/glog/archive/v0.4.0.tar.gz",
|
||||
],
|
||||
build_file_content = """
|
||||
licenses(['notice'])
|
||||
|
||||
load(':bazel/glog.bzl', 'glog_library')
|
||||
# TODO: figure out why enabling gflags leads to SIGSEV on the logging init
|
||||
glog_library(with_gflags=0)
|
||||
"""
|
||||
)
|
||||
|
||||
http_archive(
|
||||
|
Reference in New Issue
Block a user