File tree 2 files changed +7
-15
lines changed 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- # TODO(mattmoor): Rewrite this in Python.
17
+ # TODO(mattmoor): Ideally we'd rewrite this in Python for portability, but
18
+ # since the executes during WORKSPACE instantiation that would require
19
+ # redistributing PAR files, since we cannot invoke built tools at that time.
18
20
NAME=" $1 "
19
21
REQUIREMENTS_TXT=" $2 "
20
22
REQUIREMENTS_BZL=" $3 "
69
71
_packages = {
70
72
$( for p in ${PACKAGES} ; do
71
73
whl=" $( basename ${p} ) "
72
- echo " \" $( package_name ${whl} ) \" : \" @$( repository_name ${whl} ) //lib \" ,"
74
+ echo " \" $( package_name ${whl} ) \" : \" @$( repository_name ${whl} ) //:pkg \" ,"
73
75
done)
74
76
}
75
77
Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
17
17
18
- # TODO(mattmoor): Rewrite this in Python.
18
+ # TODO(mattmoor): Ideally we'd rewrite this in Python for portability, but
19
+ # since the executes during WORKSPACE instantiation that would require
20
+ # redistributing PAR files, since we cannot invoke built tools at that time.
19
21
WHL=" $1 "
20
22
REQUIREMENTS=" $2 "
21
23
PKG=$( basename " ${WHL} " | cut -d' -' -f 1)
@@ -72,21 +74,9 @@ py_library(
72
74
deps = [$(
73
75
DELIM=
74
76
for d in ${DEPS[@]} ; do
75
- # Use the dictionary?
76
77
echo -n " ${DELIM} packages(\" ${d} \" )"
77
78
DELIM=,
78
79
done
79
80
) ],
80
81
)
81
82
EOF
82
-
83
- # A convenience for terseness.
84
- mkdir lib
85
- cat > " lib/BUILD" << EOF
86
- package(default_visibility = ["//visibility:public"])
87
-
88
- py_library(
89
- name = "lib",
90
- deps = ["//:pkg"],
91
- )
92
- EOF
You can’t perform that action at this time.
0 commit comments