File tree 4 files changed +149
-258
lines changed 4 files changed +149
-258
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ docker run -i --rm -v $PWD:/v -w /v --net=host \
56
56
-e BAZEL_OPTIMIZATION=" ${BAZEL_OPTIMIZATION} " \
57
57
gcr.io/tensorflow-testing/nosla-ubuntu16.04-manylinux2010@sha256:3a9b4820021801b1fa7d0592c1738483ac7abc209fc6ee8c9ef06cf2eab2d170 /v/.github/workflows/build.bazel.sh
58
58
59
+ sudo chown -R $( id -nu) :$( id -ng) .
60
+
59
61
docker run -i --rm --user $( id -u) :$( id -g) -v /etc/password:/etc/password -v $PWD :/v -w /v --net=host \
60
62
python:${PYTHON_VERSION} -slim python setup.py --data build -q bdist_wheel
61
63
File renamed without changes.
Original file line number Diff line number Diff line change @@ -288,6 +288,34 @@ TFIO_DATAPATH=bazel-bin \
288
288
' python3 -m pytest -s -v tests/test_serialization_eager.py'
289
289
```
290
290
291
+ #### Python Wheels
292
+
293
+ It is possible to build python wheels after bazel build is complete with the following command:
294
+ ```
295
+ python3 setup.py bdist_wheel --data bazel-bin
296
+ ```
297
+ The whl file is will be available in dist directory. Note the bazel binary directory ` bazel-bin `
298
+ has to be passed with ` --data ` args in order for setup.py to locate the necessary share objects,
299
+ as ` bazel-bin ` is outside of the ` tensorflow_io ` package directory.
300
+
301
+ Alternatively, source install could be done with:
302
+ ```
303
+ TFIO_DATAPATH=bazel-bin python3 -m pip install .
304
+ ```
305
+ with ` TFIO_DATAPATH=bazel-bin ` passed for the same readon.
306
+
307
+ Note installing with ` -e ` is different from the above. The
308
+ ```
309
+ TFIO_DATAPATH=bazel-bin python3 -m pip install -e .
310
+ ```
311
+ will not install shared object automatically even with ` TFIO_DATAPATH=bazel-bin ` . Instead,
312
+ ` TFIO_DATAPATH=bazel-bin ` has to be passed everytime the program is run after the install:
313
+ ```
314
+ TFIO_DATAPATH=bazel-bin python3
315
+ # import tensorflow_io as tfio
316
+ # ...
317
+ ```
318
+
291
319
#### Docker
292
320
293
321
For Python development, a reference Dockerfile [ here] ( tools/dev/Dockerfile ) can be
You can’t perform that action at this time.
0 commit comments