-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathBUILD.bazel
123 lines (114 loc) · 4.04 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("@python_versions//3.10:defs.bzl", compile_pip_requirements_3_10 = "compile_pip_requirements")
load("@python_versions//3.11:defs.bzl", compile_pip_requirements_3_11 = "compile_pip_requirements")
# load("@python_versions//3.9:defs.bzl", compile_pip_requirements_3_9 = "compile_pip_requirements")
load("@rules_python//python:packaging.bzl", "py_package", "py_wheel")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
load("//:version.bzl", "SPU_VERSION")
# compile_pip_requirements_3_9(
# name = "requirements_3_9",
# src = "requirements_3_9.txt",
# requirements_txt = "requirements_lock_3_9.txt",
# tags = ["manual"],
# )
compile_pip_requirements_3_10(
name = "requirements_3_10",
src = "requirements.txt",
requirements_txt = "requirements_lock_3_10.txt",
tags = ["manual"],
)
compile_pip_requirements_3_11(
name = "requirements_3_11",
src = "requirements.txt",
requirements_txt = "requirements_lock_3_11.txt",
tags = ["manual"],
)
compile_pip_requirements(
name = "requirements-dev",
src = "requirements-dev.txt",
requirements_txt = "requirements_dev_lock.txt",
tags = ["manual"],
)
exports_files([
"README.md",
])
# # https://rules-python.readthedocs.io/en/latest/api/rules_python/python/packaging.html#py_wheel_rule
# py_wheel(
# name = "spu_wheel",
# abi = select(
# {
# "@rules_python//python/config_settings:is_python_3.10": "cp310",
# "@rules_python//python/config_settings:is_python_3.11": "cp311",
# # "@rules_python//python/config_settings:is_python_3.9": "cp39",
# "//conditions:default": "none",
# },
# ),
# author = "SecretFlow Team",
# author_email = "[email protected]",
# classifiers = [
# "Programming Language :: Python :: 3.9",
# "Programming Language :: Python :: 3.10",
# "Programming Language :: Python :: 3.11",
# ],
# description_content_type = "text/markdown",
# description_file = "README.md",
# distribution = "spu",
# extra_distinfo_files = {
# "//:LICENSE": "LICENSE",
# },
# homepage = "https://github.com/secretflow/spu",
# license = "Apache License 2.0",
# # TODO: add other fields.
# platform = select(
# {
# "@bazel_tools//src/conditions:linux_x86_64": "manylinux2014_x86_64",
# "@bazel_tools//src/conditions:darwin_arm64": "macosx_13_0_arm64",
# "@bazel_tools//src/conditions:linux_aarch64": "manylinux_2_28_aarch64",
# "//conditions:default": "any",
# },
# ),
# python_requires = ">=3.9",
# python_tag = select(
# {
# "@rules_python//python/config_settings:is_python_3.10": "cp310",
# "@rules_python//python/config_settings:is_python_3.11": "cp311",
# # "@rules_python//python/config_settings:is_python_3.9": "cp39",
# "//conditions:default": "py3",
# },
# ),
# requires_file = "requirements.txt",
# summary = "SPU aims to be a 'provable', 'measurable' secure computation device.",
# twine = None,
# version = SPU_VERSION,
# deps = [
# ":spu_pkg",
# ],
# )
py_package(
name = "spu_pkg",
packages = [
"libspu",
"spu",
],
visibility = ["//visibility:private"],
deps = [
"//spu:api",
"//spu:init",
"//spu:libpsi",
"//spu:libspu",
"//spu/ops/groupby",
"//spu/utils:distributed",
],
)