Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 562ffc7

Browse filesBrowse files
committed
Fix py_import example to work on python 3
1 parent 4b934d2 commit 562ffc7
Copy full SHA for 562ffc7

File tree

2 files changed

+4
-3
lines changed
Filter options

2 files changed

+4
-3
lines changed

‎examples/py_import/BUILD

Copy file name to clipboardExpand all lines: examples/py_import/BUILD
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
load("@pip//:requirements.bzl", "requirement")
1615
load("@rules_python//python:defs.bzl", "py_import", "py_test")
1716

1817
package(default_visibility = ["//visibility:public"])
@@ -29,8 +28,11 @@ py_import(
2928
# examples/py_import/helloworld.py=examples/legacy_pip_import/helloworld/helloworld.py \
3029
# examples/__init__.py= \
3130
# examples/py_import/__init__.py=
31+
# TODO: we should construct an egg from local sources, or to make
32+
# the example more meaningful for users, find an egg on the internet.
33+
# Also it would help illustrate the rules if the egg has some other
34+
# dependency, requiring deps here.
3235
srcs = ["helloworld.egg"],
33-
deps = [requirement("futures")],
3436
)
3537

3638
py_test(

‎examples/py_import/requirements.txt

Copy file name to clipboard
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
futures>=3.1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.